diff -Nru ircd-irc2-2.11.2p2+dfsg/common/parse.c ircd-irc2-2.11.2p3~dfsg/common/parse.c --- ircd-irc2-2.11.2p2+dfsg/common/parse.c 2008-06-10 22:06:53.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/common/parse.c 2010-08-12 16:29:30.000000000 +0000 @@ -19,7 +19,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: parse.c,v 1.96 2008/06/10 22:06:53 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: parse.c,v 1.97 2010/08/12 16:29:30 bif Exp $"; #endif #include "os.h" @@ -901,8 +901,9 @@ if (IsServer(cptr)) { sendto_serv_butone(NULL, ":%s KILL %s :%s (%s[%s] != %s)", - me.name, sptr->name, me.name, - sptr->name, sptr->from->name, + me.name, + sptr->user ? sptr->user->uid : sptr->name, + me.name, sptr->name, sptr->from->name, get_client_name(cptr, TRUE)); sptr->flags |= FLAGS_KILLED; return exit_client(cptr, sptr, &me, "Fake Prefix"); diff -Nru ircd-irc2-2.11.2p2+dfsg/common/patchlevel.h ircd-irc2-2.11.2p3~dfsg/common/patchlevel.h --- ircd-irc2-2.11.2p2+dfsg/common/patchlevel.h 2009-11-13 20:31:32.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/common/patchlevel.h 2010-08-13 19:59:43.000000000 +0000 @@ -17,6 +17,6 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "0211020002" /* for server identification */ +#define PATCHLEVEL "0211020003" /* for server identification */ #define DEVLEVEL 'a' #endif diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/changelog ircd-irc2-2.11.2p3~dfsg/debian/changelog --- ircd-irc2-2.11.2p2+dfsg/debian/changelog 2011-09-26 21:05:11.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/changelog 2014-09-05 07:29:13.000000000 +0000 @@ -1,3 +1,59 @@ +ircd-irc2 (2.11.2p3~dfsg-4) unstable; urgency=medium + + * Don't print ircd.conf to console in postinst + * Ensure grep in postinst is only run if there is a ircd.conf + (Closes: #760369) + * Update exmaple config with % instead of : to meet new IPv6 config + delimiter (Closes: #760371) + * debian/patches/01_manpages.patch: Fix manpages lintian warnings + * synthesize dircategory and direntry in ircd-irc2.info to please lintian + + -- Kilian Krause Fri, 05 Sep 2014 09:29:05 +0200 + +ircd-irc2 (2.11.2p3~dfsg-3) unstable; urgency=medium + + * ircd.conf delimiter is % globally with IPv6. Convert all lines to %. + + -- Kilian Krause Wed, 03 Sep 2014 11:50:27 +0200 + +ircd-irc2 (2.11.2p3~dfsg-2) unstable; urgency=medium + + * Pass CPPFLAGS as CFLAGS to make sure build system will not ignore them + + -- Kilian Krause Tue, 02 Sep 2014 21:12:49 +0200 + +ircd-irc2 (2.11.2p3~dfsg-1) unstable; urgency=low + + * New upstream release: 2.11.2p3 + * Add myself to Uploaders + * Update debian/watch: ~dfsg instead of +dfsg, use svn-upgrade + * debian/rules: add get-orig-source target to do the automatic repacking + * Ignore missing debian/maint/ircd-irc2.info upon clean + * Remove irc2.11.2p2-s_conf.c.diff - incorporated upstream + * Check upstream gpg signature in debian/watch + * Add Homepage field + * Shut up lintian: + - set -e on its own line instead of shebang + - source LSB function in init script + - description-synopsis-starts-with-article (set override) + * debian/copyright talking about GPL as symlink corrected to GPL-1 + * Enable IPv6 support + * Bump compat level to 9 + * Bump b-d for debhelper to 9 too + * Add dpkg-buildflags to configure call for hardening + * Add dpkg-buildflags to build target too + * Add Vcs-* Entries to debian/control + * Add status target to init script + * Add description to init script to shut up lintian + * Fix permissions of /var/log/ircd/ - set owner to user irc + * Add more verbose whatis entry in ircd-mkpasswd.8 to shut up lintian + * Update P/M lines in default config to % instead of : since we're IPv6 now. + Add postinst script to auto-adjust existing configs (Closes: #547613) + * Bump Standards-Version to 3.9.5 - no changes needed. + * debian/rules: Update to dh-style + + -- Kilian Krause Mon, 01 Sep 2014 22:23:39 +0200 + ircd-irc2 (2.11.2p2+dfsg-2) unstable; urgency=low * Remove auto generated dpkg-source patch. (Closes: #643167) diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/compat ircd-irc2-2.11.2p3~dfsg/debian/compat --- ircd-irc2-2.11.2p2+dfsg/debian/compat 2010-04-18 18:19:34.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/compat 2014-08-19 21:37:03.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/control ircd-irc2-2.11.2p3~dfsg/debian/control --- ircd-irc2-2.11.2p2+dfsg/debian/control 2010-04-18 18:45:29.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/control 2014-09-01 19:56:18.000000000 +0000 @@ -2,8 +2,12 @@ Section: net Priority: optional Maintainer: Kurt Roeckx -Build-Depends: debhelper (>> 7.0.0), zlib1g-dev, autotools-dev -Standards-Version: 3.8.3 +Uploaders: Kilian Krause +Build-Depends: debhelper (>> 9.0), zlib1g-dev, autotools-dev +Standards-Version: 3.9.5 +Homepage: http://www.irc.org/ +Vcs-Svn: svn://anonscm.debian.org/collab-maint/deb-maint/ircd-irc2/ +Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/ircd-irc2/ Package: ircd-irc2 Architecture: any diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/copyright ircd-irc2-2.11.2p3~dfsg/debian/copyright --- ircd-irc2-2.11.2p2+dfsg/debian/copyright 2010-04-18 18:19:34.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/copyright 2014-08-19 21:33:39.000000000 +0000 @@ -31,7 +31,7 @@ On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +Public License can be found in `/usr/share/common-licenses/GPL-1'. There are major contributions from: Jarkko Oikarinen , diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/info ircd-irc2-2.11.2p3~dfsg/debian/info --- ircd-irc2-2.11.2p2+dfsg/debian/info 2010-04-19 17:12:12.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/info 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian/maint/ircd-irc2.info diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.info-dir-entry ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.info-dir-entry --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.info-dir-entry 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.info-dir-entry 2014-09-05 06:22:58.000000000 +0000 @@ -0,0 +1,4 @@ +INFO-DIR-SECTION Network services +START-INFO-DIR-ENTRY +* ircd: (ircd-irc2). The IRCnet IRC daemon +END-INFO-DIR-ENTRY diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.init ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.init --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.init 2010-04-18 18:51:49.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.init 2014-08-29 12:22:19.000000000 +0000 @@ -1,20 +1,24 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: ircd-irc2 -# Required-Start: $remote_fs -# Required-Stop: $remote_fs +# Required-Start: $network $remote_fs +# Required-Stop: $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Starts/stops the irc daemon +# Description: Provide IRC service with the IRC daemon ### END INIT INFO set -e +. /lib/lsb/init-functions + # $PATH to go PATH=/sbin:/bin:/usr/sbin:/usr/bin # where the irc-daemon is IRCD=/usr/sbin/ircd +NAME=ircd PIDFILE=/var/run/ircd/ircd.pid check_pid_dir() { @@ -29,12 +33,16 @@ # Gracefully exit if the package has been removed. test -x $IRCD || exit 0 +status_ircd() { + status_of_proc -p "${PIDFILE}" "${IRCD}" "${NAME}" +} + case "$1" in start) check_pid_dir echo -n "Starting irc server daemon:" - echo -n " ircd" + echo -n " ${NAME}" start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ --chuid irc --exec ${IRCD} --oknodo echo "." @@ -42,15 +50,18 @@ stop) echo -n "Stopping irc server daemon:" - echo -n " ircd" + echo -n " ${NAME}" start-stop-daemon --stop --quiet --oknodo \ --pidfile ${PIDFILE} --exec ${IRCD} echo "." ;; + status) + status_ircd + ;; reload|force-reload) echo -n "Reloading irc server daemon:" - echo -n " ircd" + echo -n " ${NAME}" start-stop-daemon --stop --signal 1 --quiet \ --pidfile ${PIDFILE} --exec ${IRCD} echo "." @@ -59,7 +70,7 @@ restart) check_pid_dir echo -n "Restarting irc server daemon:" - echo -n " ircd" + echo -n " ${NAME}" start-stop-daemon --stop --quiet --oknodo \ --pidfile ${PIDFILE} --exec ${IRCD} sleep 1 @@ -68,7 +79,7 @@ echo "." ;; *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" + echo "Usage: $0 {start|stop|status|restart|reload|force-reload}" exit 1 ;; esac diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.install ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.install --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.install 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.install 2014-09-01 19:56:18.000000000 +0000 @@ -0,0 +1,3 @@ +debian/maint/ircd.conf etc/ircd +debian/maint/ircd.motd etc/ircd +debian/maint/iauth.conf etc/ircd diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.lintian-overrides ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.lintian-overrides --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.lintian-overrides 2014-09-01 19:56:18.000000000 +0000 @@ -0,0 +1,5 @@ +ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.appendix.gz +ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.sgml.gz +ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.txt.gz +ircd-irc2: description-synopsis-starts-with-article + diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.manpages ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.manpages --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.manpages 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.manpages 2014-09-01 19:56:18.000000000 +0000 @@ -0,0 +1,6 @@ +doc/iauth.8 +doc/iauth.conf.5 +doc/ircd.8 +debian/maint/chkconf.8 +debian/maint/ircd-mkpasswd.8 +debian/maint/ircdwatch.8 diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.postinst ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.postinst --- ircd-irc2-2.11.2p2+dfsg/debian/ircd-irc2.postinst 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/ircd-irc2.postinst 2014-09-04 20:17:28.000000000 +0000 @@ -0,0 +1,51 @@ +#!/bin/sh +# postinst script for fex +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + if [ -f /etc/ircd/ircd.conf ];then + if egrep -q '^[A-Z]:' /etc/ircd/ircd.conf;then + echo 'Auto converting config lines from : to % for added IPv6 support ...' + cd /etc/ircd + for file in $(sed -ne '/include/s,include(\(.*\)),\1,p' /etc/ircd/ircd.conf) /etc/ircd/ircd.conf;do + [ -f "$file" ]&&sed -i -e '/^[^#]:/s,:,%,g' "$file" + done + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +# vi: set smartindent ts=4 sw=4 expandtab autoindent sts=4: diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/lintian.overrides ircd-irc2-2.11.2p3~dfsg/debian/lintian.overrides --- ircd-irc2-2.11.2p2+dfsg/debian/lintian.overrides 2010-04-18 19:00:41.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/lintian.overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.appendix.gz -ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.sgml.gz -ircd-irc2: package-contains-upstream-install-documentation usr/share/doc/ircd-irc2/INSTALL.txt.gz diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/maint/ircd.conf ircd-irc2-2.11.2p3~dfsg/debian/maint/ircd.conf --- ircd-irc2-2.11.2p2+dfsg/debian/maint/ircd.conf 2010-04-18 18:19:35.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/maint/ircd.conf 2014-09-02 20:34:36.000000000 +0000 @@ -4,18 +4,18 @@ # and instructions # M-Line -M:irc.localhost::Debian ircd default configuration::000A +M%irc.localhost%%Debian ircd default configuration%%000A # A-Line -A:This is Debian's default ircd configurations:Please edit your /etc/ircd/ircd.conf file:Contact for questions::ExampleNet +A%This is Debian's default ircd configurations%Please edit your /etc/ircd/ircd.conf file%Contact for questions%%ExampleNet # Y-Lines -Y:1:90::100:512000:5.5:100.100 -Y:2:90::300:512000:5.5:250.250 +Y%1%90%%100%512000%5.5%100.100 +Y%2%90%%300%512000%5.5%250.250 # I-Line -I:*:::0:1 -I:127.0.0.1/32:::0:1 +I%*%%%0%1 +I%127.0.0.1/32%%%0%1 # P-Line -P::::6667: +P%%%%6667% diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/maint/ircd-mkpasswd.8 ircd-irc2-2.11.2p3~dfsg/debian/maint/ircd-mkpasswd.8 --- ircd-irc2-2.11.2p2+dfsg/debian/maint/ircd-mkpasswd.8 2010-04-18 18:19:35.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/maint/ircd-mkpasswd.8 2014-08-29 12:45:48.000000000 +0000 @@ -1,6 +1,6 @@ .TH IRCD-MKPASSWD "8" "May 2002" .SH NAME -ircd-mkpasswd \- manual page for ircd-mkpasswd +ircd-mkpasswd \- generate password hashes for ircd .SH SYNOPSIS .hy 0 .BI "ircd-mkpasswd [-m|-d] [-l saltlength] [-s salt] [-p plaintext]" diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/patches/01_manpages.patch ircd-irc2-2.11.2p3~dfsg/debian/patches/01_manpages.patch --- ircd-irc2-2.11.2p2+dfsg/debian/patches/01_manpages.patch 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/patches/01_manpages.patch 2014-09-04 21:01:14.000000000 +0000 @@ -0,0 +1,41 @@ +Description: fixup manpage lintian warnings +Author: Kilian Krause +Last-Update: 2014-09-04 + +--- ircd-irc2-2.11.2p3~dfsg.orig/doc/iauth.8 ++++ ircd-irc2-2.11.2p3~dfsg/doc/iauth.8 +@@ -29,7 +29,7 @@ This option dumps information about the + .SH EXAMPLE + .RS + .nf +-millennium% \fBiauth -c iauth.conf\fP ++millennium% \fBiauth \-c iauth.conf\fP + iauth 2.10 + + Reading "iauth.conf" +--- ircd-irc2-2.11.2p3~dfsg.orig/doc/iauth.conf.5 ++++ ircd-irc2-2.11.2p3~dfsg/doc/iauth.conf.5 +@@ -49,9 +49,9 @@ syntax using the \fIiauth\fP program to + .SH IAUTH OPTIONS + .TP + .B timeout = +-This allows to specify how much time each module has to complete its work +-for each connection. This option can also be specified individually for +-each module. The default is 30 seconds. ++This allows one to specify how much time each module has to complete its work ++for each connection. This option can also be specified individually for each ++module. The default is 30 seconds. + .TP + .B required + By specifying this keyword, the IRC server is told not to accept new user +--- ircd-irc2-2.11.2p3~dfsg.orig/doc/ircd.8 ++++ ircd-irc2-2.11.2p3~dfsg/doc/ircd.8 +@@ -87,7 +87,7 @@ is used to override the default ircd.con + .TP + .BI \-x " #" + Defines the debuglevel for ircd. The higher the debuglevel, the more stuff +-gets directed to debugging file (or standard output if -t option was used ++gets directed to debugging file (or standard output if \-t option was used + as well). + .TP + .BI \-h " hostname" diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/patches/irc2.11.2p2-s_conf.c.diff ircd-irc2-2.11.2p3~dfsg/debian/patches/irc2.11.2p2-s_conf.c.diff --- ircd-irc2-2.11.2p2+dfsg/debian/patches/irc2.11.2p2-s_conf.c.diff 2010-04-18 18:31:05.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/patches/irc2.11.2p2-s_conf.c.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -Index: s_conf.c -=================================================================== -RCS file: /usr/local/repository/irc/ircd/s_conf.c,v -retrieving revision 1.192 -retrieving revision 1.194 -diff -u -r1.192 -r1.194 ---- irc/ircd/s_conf.c 13 Nov 2009 20:25:55 -0000 1.192 -+++ irc/ircd/s_conf.c 9 Mar 2010 15:05:01 -0000 1.194 -@@ -48,7 +48,7 @@ - */ - - #ifndef lint --static const volatile char rcsid[] = "@(#)$Id: s_conf.c,v 1.192 2009/11/13 20:25:55 chopin Exp $"; -+static const volatile char rcsid[] = "@(#)$Id: s_conf.c,v 1.194 2010/03/09 15:05:01 chopin Exp $"; - #endif - - #include "os.h" -@@ -2700,7 +2700,7 @@ - ** some crucial parts, which can be seen as a typo. --Beeth */ - err = 1; - } -- if (strchr(host, '/') && match_ipmask(host, sptr, 0) == -1) -+ if (host && strchr(host, '/') && match_ipmask(host+1, sptr, 0) == -1) - { - /* check validity of 1.2.3.0/24 or it will be spewing errors - ** for every connecting client. */ diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/patches/series ircd-irc2-2.11.2p3~dfsg/debian/patches/series --- ircd-irc2-2.11.2p2+dfsg/debian/patches/series 2011-09-26 21:04:32.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/patches/series 2014-09-04 21:01:14.000000000 +0000 @@ -1 +1 @@ -irc2.11.2p2-s_conf.c.diff +01_manpages.patch diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/postrm ircd-irc2-2.11.2p3~dfsg/debian/postrm --- ircd-irc2-2.11.2p2+dfsg/debian/postrm 2010-04-18 18:19:34.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/postrm 2014-08-29 13:20:41.000000000 +0000 @@ -1,17 +1,16 @@ -#!/bin/sh -e +#!/bin/sh -if [ "$1" = "purge" ]; then - if [ -d "/var/log/ircd" ]; then - rm -rf /var/log/ircd/* - rmdir --ignore-fail-on-non-empty /var/log/ircd - fi -fi +set -e if [ "$1" = "purge" ]; then + if [ -d "/var/log/ircd" ]; then + rm -rf /var/log/ircd/* + rmdir --ignore-fail-on-non-empty /var/log/ircd + fi if [ -d "/var/run/ircd" ]; then - rm -rf /var/run/ircd/* - rmdir --ignore-fail-on-non-empty /var/run/ircd - fi + rm -rf /var/run/ircd/* + rmdir --ignore-fail-on-non-empty /var/run/ircd + fi fi #DEBHELPER# diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/rules ircd-irc2-2.11.2p3~dfsg/debian/rules --- ircd-irc2-2.11.2p2+dfsg/debian/rules 2010-04-19 17:12:03.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/rules 2014-09-05 07:23:45.000000000 +0000 @@ -1,124 +1,111 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build $(DEB_HOST_GNU_TYPE) +else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif + +# We copy around a number of things in case we're linux: +BUILD_OS=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +export PROC := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + BUILDFLAGS += OPTIMIZE=-O0 +else + BUILDFLAGS += OPTIMIZE=-O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif -CONFIG_GUESS=`support/config.guess` - -configure: configure-stamp -configure-stamp: - - dh_testdir - -test -r /usr/share/misc/config.sub && \ - cp -f /usr/share/misc/config.sub support/config.sub - -test -r /usr/share/misc/config.guess && \ - cp -f /usr/share/misc/config.guess support/config.guess - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \ - --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --bindir=/usr/bin \ - --datadir=/usr/share --sbindir=/usr/sbin --localstatedir=/var --sysconfdir=/etc/ircd \ - --with-logdir=/var/log/ircd --with-zlib - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - - cp debian/maint/config.h $(CONFIG_GUESS) - - cat $(CONFIG_GUESS)/Makefile | sed 's/\/var\/run/&\/ircd/g' >> $(CONFIG_GUESS)/Makefile.new - mv $(CONFIG_GUESS)/Makefile.new $(CONFIG_GUESS)/Makefile +DEBVERSION := $(shell head -n 1 debian/changelog \ + | sed -e 's/^[^(]*(\([^)]*\)).*/\1/') +UPVERSION := $(shell echo $(DEBVERSION) | sed 's/~dfsg-.//') + +FILENAME := ircd-irc2_$(UPVERSION)~dfsg.orig.tar.gz +UPFILENAME := ircd-irc2_$(UPVERSION).orig.tar.gz +URL := http://ftp.irc.org/ftp/irc/server/irc$(UPVERSION).tgz + +%: + dh "$@" --with autotools_dev + +override_dh_auto_configure: + mkdir builddir + cp debian/maint/config.h builddir + cp support/configure builddir + cd builddir;./configure \ + CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --infodir=\$${prefix}/share/info \ + --localstatedir=/var \ + --mandir=\$${prefix}/share/man \ + --prefix=/usr \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/ircd \ + --with-logdir=/var/log/ircd \ + --with-zlib \ + --enable-ipv6 + sed -i -e 's/\/var\/run/&\/ircd/g' builddir/Makefile - cd $(CONFIG_GUESS) && $(MAKE) all - touch build-stamp +override_dh_auto_build: + $(MAKE) -C builddir all -clean: - - -rm -rf $(CONFIG_GUESS) - -rm support/config.sub - -rm support/config.guess - - -rm -rf configure-stamp - -rm -rf build-stamp - -rm debian/maint/ircd-irc2.info - +override_dh_clean: + -rm -rf builddir dh_clean -install: - - dh_testdir - dh_testroot - dh_prep - dh_installdirs - +override_dh_install: + dh_install # ircd-package - cp $(CONFIG_GUESS)/chkconf debian/ircd-irc2/usr/sbin - cp $(CONFIG_GUESS)/iauth debian/ircd-irc2/usr/sbin - cp $(CONFIG_GUESS)/ircd debian/ircd-irc2/usr/sbin - cp $(CONFIG_GUESS)/ircd-mkpasswd debian/ircd-irc2/usr/sbin - cp $(CONFIG_GUESS)/ircdwatch debian/ircd-irc2/usr/sbin - - cp debian/maint/iauth.conf debian/ircd-irc2/etc/ircd - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - - dh_testdir - dh_testroot - - # copy overrides file - install -D `pwd`/debian/lintian.overrides `pwd`/debian/ircd-irc2/usr/share/lintian/overrides/ircd-irc2 - chmod -x `pwd`/debian/ircd-irc2/usr/share/lintian/overrides/ircd-irc2 - - # install config... - cp debian/maint/ircd.conf debian/ircd-irc2/etc/ircd/ircd.conf - - # ... and motd-file. - cp debian/maint/ircd.motd debian/ircd-irc2/etc/ircd/ircd.motd - - dh_installdocs -A + cp builddir/chkconf debian/ircd-irc2/usr/sbin + cp builddir/iauth debian/ircd-irc2/usr/sbin + cp builddir/ircd debian/ircd-irc2/usr/sbin + cp builddir/ircd-mkpasswd debian/ircd-irc2/usr/sbin + cp builddir/ircdwatch debian/ircd-irc2/usr/sbin + +override_dh_installexamples: + dh_installexamples + # convert example config to % since we're IPv6 now + sed -i -e '/^[^#]:/s,:,\%,g' debian/ircd-irc2/usr/share/doc/ircd-irc2/ircd.conf.example + +override_dh_installinfo: + dh_installinfo + # synthesize dircategory and direntry + mkdir -p debian/ircd-irc2/usr/share/info/ + cat debian/ircd-irc2.info-dir-entry doc/INSTALL.info >debian/ircd-irc2/usr/share/info/ircd-irc2.info - cp doc/INSTALL.info debian/maint/ircd-irc2.info - dh_installinfo -A - - dh_installman -pircd-irc2 doc/iauth.8 doc/iauth.conf.5 \ - doc/ircd.8 \ - debian/maint/chkconf.8 \ - debian/maint/ircd-mkpasswd.8 \ - debian/maint/ircdwatch.8 - - dh_installchangelogs -a - - dh_installinit --update-rcd-params="start 20 2 3 4 5 ." - - dh_strip - dh_compress +override_dh_fixperms: dh_fixperms - # fix permissions of var/log/ircd - chown root:irc debian/ircd-irc2/var/log/ircd - chmod -R ug+rw debian/ircd-irc2/var/log/ircd - - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + chown irc:irc debian/ircd-irc2/var/log/ircd + chmod -R 0755 debian/ircd-irc2/var/log/ircd -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +print-version: + @@echo "Debian version: $(DEBVERSION)" + @@echo "Upstream version: $(UPVERSION)" +get-orig-source: + @@dh_testdir + @@[ -d ../tarballs/. ]||mkdir -p ../tarballs + @@#this is for stable versions + @@echo Downloading $(UPFILENAME) from $(URL) ... + @@wget -nv -T10 -t3 -O ../tarballs/$(UPFILENAME) $(URL) + @@echo 'Repacking as DFSG-free (RFCs)...' + @@mkdir -p ../tarballs/ircd-irc2-$(UPVERSION).tmp/ + @@cd ../tarballs/ircd-irc2-$(UPVERSION).tmp ; tar xfz ../$(UPFILENAME) + @@find ../tarballs/ircd-irc2-$(UPVERSION).tmp/ -iname 'rfc*' -delete + @@echo Writing archive ../tarballs/$(FILENAME) ... + @@cd ../tarballs/ircd-irc2-$(UPVERSION).tmp ; tar cfz ../$(FILENAME) * + @@echo Cleaning up... + @@$(RM) -rf ../tarballs/ircd-irc2-$(UPVERSION).tmp/ ../tarballs/$(UPFILENAME) diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/source/include-binaries ircd-irc2-2.11.2p3~dfsg/debian/source/include-binaries --- ircd-irc2-2.11.2p2+dfsg/debian/source/include-binaries 1970-01-01 00:00:00.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/source/include-binaries 2014-08-19 21:29:20.000000000 +0000 @@ -0,0 +1 @@ +debian/upstream-signing-key.pgp Binary files /tmp/EQ58JRGyDL/ircd-irc2-2.11.2p2+dfsg/debian/upstream-signing-key.pgp and /tmp/dkMalGtMnU/ircd-irc2-2.11.2p3~dfsg/debian/upstream-signing-key.pgp differ diff -Nru ircd-irc2-2.11.2p2+dfsg/debian/watch ircd-irc2-2.11.2p3~dfsg/debian/watch --- ircd-irc2-2.11.2p2+dfsg/debian/watch 2010-04-18 18:19:34.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/debian/watch 2014-08-19 21:59:38.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -opts=dversionmangle=s/\+dfsg$// \ - http://ftp.irc.org/ftp/irc/server/irc(.*)\.tgz debian uupdate +opts=dversionmangle=s/\~dfsg$//,pgpsigurlmangle=s/$/.asc/ \ + http://ftp.irc.org/ftp/irc/server/irc(.*)\.tgz debian svn-upgrade diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/Authors ircd-irc2-2.11.2p3~dfsg/doc/Authors --- ircd-irc2-2.11.2p2+dfsg/doc/Authors 2004-12-28 20:55:11.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/Authors 2010-08-13 19:59:16.000000000 +0000 @@ -173,7 +173,7 @@ Michael 'Eumel' Neumayer Kurt Roeckx cleaned up the compression code, among many things Roar Thronęs for more IPv6 work -Piotr Kucharski for his work on the anti socks module +Piotr Kucharski for his work on the anti socks module Michal Svoboda removed useless anUser linked list Thanks go to those persons not mentioned here who have added their advice, diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/ChangeLog ircd-irc2-2.11.2p3~dfsg/doc/ChangeLog --- ircd-irc2-2.11.2p2+dfsg/doc/ChangeLog 2009-11-13 20:25:55.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/ChangeLog 2010-08-13 19:59:43.000000000 +0000 @@ -1,3 +1,36 @@ +2.11.2p3 + +2010-08-12 Piotr Kucharski + + * channel.c/can_send(): bans and exceptions set with cidr work only + on local server. side-effect of this was if you set non-cidr ban + (say *@*) plus a cidr exception, you were no longer heard outside + your server (you matched the ban, but cidr exception was not even + checked). allow remote clients to talk without checking for bans + and exceptions. (reported by BR). + * s_err.c, s_serv.c, s_user.c: fix various format string errors + visible on amd64 (patch from jilles). + * parse.c/cancel_clients(), s_user.c/register_user(): fix all kills + that sent a nick to send a UID, except the impossible nick collision + kill (patch from jilles). + +2010-08-11 Piotr Kucharski + + * s_conf.c/prep_kline(): reject all not fully specified u@h masks and + also *@* one. + * ircd.c/s_die(): clean up unix socket. + * s_service.c/m_service(): send SERVICE also to dist matching SID. + +2010-03-09 Piotr Kucharski + + * s_conf.c/prep_kline(): match_ipmask() was getting host with '@' char + prepended, that did not work at all. + +2009-12-11 Piotr Kucharski + + * s_conf.c/prep_kline(): oper can crash his local ircd by issuing + tkline with wrong parameters (reported by AsmPro). + 2.11.2p2 2009-11-13 Piotr Kucharski diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.info ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.info --- ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.info 2008-06-13 17:55:50.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.info 2010-08-11 17:36:56.000000000 +0000 @@ -1,7 +1,7 @@ -This is INSTALL.info, produced by makeinfo version 4.11 from -/tmp/linuxdoc-dir-1682/sgmltmp.INSTALL.2.texi. +This is INSTALL.info, produced by makeinfo version 4.13 from +info file generated from .//INSTALL.sgml by means of linuxdoc-tools. + -\input texinfo  File: INSTALL.info, Node: Top, Next: Installing IRC-, Up: (dir) @@ -10,7 +10,7 @@ ************************************************ SGML version by Christophe Kalt, updated by Piotr Kucharski - $Id: INSTALL.info,v 1.86 2008/06/13 17:55:50 chopin Exp $ + $Id: INSTALL.info,v 1.87 2010/08/11 17:36:56 bif Exp $ This document describes how to install, and configure IRC 2.11 @@ -49,6 +49,7 @@ There are a few options to "configure" to help it out, or change the default behaviour: + `--prefix=DIR' changes the default directory into which ircd will install using "make install". This defaults to /usr/local @@ -109,17 +110,17 @@ 1.2 Notes for Cygwin32 users ============================ -The daemon of 2.11 release compiles properly on W32 systems which -have the GNU-Win32 environment ( (http://www.cygwin.com/)) setup. At -the time of the release, tests were made using the version b20.1 of the +The daemon of 2.11 release compiles properly on W32 systems which have +the GNU-Win32 environment (`http://www.cygwin.com/') setup. At the +time of the release, tests were made using the version b20.1 of the Cygwin32 library. When compiling on such system, you want to make sure that you have carefully followed the Cygwin32 installation notes. - Also, the IRC server needs a `resolv.conf' file in order to + Also, the IRC server needs a *resolv.conf* file in order to initialize the resolver. This file can be anywhere (see configure -options), and is typically in `/etc' on UNIX systems. +options), and is typically in */etc* on UNIX systems.  File: INSTALL.info, Node: Notes concerning IPv6 support, Prev: Notes for Cygwin32 users, Up: Installing IRC- @@ -130,8 +131,8 @@ This version was tested on the following IPv6 systems: BSD/OS+KAME, Digital Unix, FreeBSD+KAME, Linux, NetBSD+INRIA. - Because IPv6 numeric addresses contain ":" characters, `the default -separator for the server configuration file is changed to "%"'. You can + Because IPv6 numeric addresses contain ":" characters, *the default +separator for the server configuration file is changed to "%"*. You can adjust it to your needs in config.h file.  @@ -164,8 +165,8 @@ 2.1 DEBUGMODE ============= -`This should only be defined for test purposes, and never used on a -production server.' +*This should only be defined for test purposes, and never used on a +production server.* Define DEBUGMODE if you want to see the ircd debugging information as the daemon is running. Normally this function will be undefined as @@ -242,10 +243,10 @@ compression level that will be used. Values above 5 will noticeably increase the CPU used by the server. - The zlib package may be found at (http://www.gzip.org/zlib/). The + The zlib package may be found at `http://www.gzip.org/zlib/'. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files -(ftp://ds.internic.net/rfc/rfc1950.txt) (zlib format), rfc1951.txt +`ftp://ds.internic.net/rfc/rfc1950.txt' (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).  @@ -345,6 +346,7 @@ The ircd.conf file contains various records that specify configuration options. The record types are as follows: + 1. Machine information (M) 2. Administrative info (A) @@ -379,8 +381,8 @@ Except for types "M" and "A", you are allowed to have multiple records of the same type. In some cases, you can have concurrent -records. `It is important to note that the last matching record will -be used'. This is especially useful when setting up I records (client +records. *It is important to note that the last matching record will +be used*. This is especially useful when setting up I records (client connections). `NEW!!!' @@ -480,7 +482,7 @@ `Note' Using "*" as allows OS to choose best outgoing - source IP. See also `Server Connections' section for configuring + source IP. See also *Server Connections* section for configuring source IP of outgoing connections. @@ -561,12 +563,13 @@ * Internet Ports + `Internet IP#' If the host on which the server runs has several IP addresses, you can define for which IP address connections will be accepted. If none is defined here, server will bind - to all interfaces (INADDR_ANY). See also `Machine - configuration' and `Server Connections' sections to properly + to all interfaces (INADDR_ANY). See also *Machine + configuration* and *Server Connections* sections to properly configure outgoing connections. `Port' @@ -581,6 +584,7 @@ * Unix Socket Ports. + `Directory' The path set in this field should be the directory name in which to create the unix socket for later listening to. The @@ -602,6 +606,7 @@ `Flags' Flags changing behaviour of a given P-line. It can be empty or one of: + * D - delayed accept (not active until first netjoin) * S - server-only (user connections are rejected) @@ -637,8 +642,8 @@ connection frequency (for servers) and maximum number of links that class should have. - Currently, the Y: line `MUST' appear in the ircd.conf file - `BEFORE' it is used in any other way. + Currently, the Y: line *MUST* appear in the ircd.conf file + *BEFORE* it is used in any other way. `Format' Y::::::. + * x: defines maximum size of sendq, defaults to QUEUELEN if unset. @@ -683,6 +689,7 @@ `Local limit' This field is used to limit the number of local concurrent connections. The format is . + * x: defines the maximum number of clients from the same host (IP) will be allowed. @@ -699,6 +706,7 @@ `CIDR Limit' This field is used to limit the number of local host counts within a given IP network. The format is / + * x: defines the maximum number of clients from the same network @@ -780,6 +788,7 @@ ====================== How to let clients connect to your IRCD. + `Introduction' A client is a program that connects to the ircd daemon (ircd). There are clients written in C, GNU Emacs Lisp and many other @@ -820,15 +829,15 @@ the server. If "user@" prefixes the actual name the server will require that the remote username returned by the ident server be the same as the one given before the "@". Wildcards are permitted, - but `please' rather leave this field empty and use bitmask in - `Host Addr' field. + but *please* rather leave this field empty and use bitmask in + *Host Addr* field. Empty field matches any. "*" also matches any, but it requires working DNS for a client. Using this field to enforce that clients have no Host Name set is not working (they will rather be denied connection). Use "N" - `flag'. + *flag*. `Port' Specifies the port number for which this configuration line is @@ -841,6 +850,7 @@ `Flags' This field contains flags of an I:line; flags are one character in size, can be combined and their order does not matter. + * D - restricted, when client has no reverse DNS * E - client is exempted from K-lines @@ -864,9 +874,9 @@ = or - depending on the ident reply. `Note' - The server checks if the client hostname matches the `TARGET Host - NAME' field. If a match is found, server checks `TARGET Host - Addr' field. If a match is found, the client is accepted. Clients + The server checks if the client hostname matches the *TARGET Host + NAME* field. If a match is found, server checks *TARGET Host + Addr* field. If a match is found, the client is accepted. Clients host is set either to its hostname (if available) or, using "N" or "M" flag, to its IP. @@ -893,7 +903,7 @@ I:128.214.6.100::nic.funet.fi::1 - Allow clients from a machine with that IP number `and' that + Allow clients from a machine with that IP number *and* that hostname to connect. I::secret:*.tut.fi::1 @@ -912,7 +922,7 @@ I:135.11.35.0/24::*.net::1 - Allows clients from machines which host name matches "*.net" `and' + Allows clients from machines which host name matches "*.net" *and* which IP address is within block "135.11.35.0/24" to connect to the server. @@ -921,7 +931,7 @@ I:135.11.35.0/24::*.net::1 This set of two I:lines allows clients from machines which host - name matches "*.net" `and' which IP address is within block + name matches "*.net" *and* which IP address is within block "135.11.35.0/24" to connect to the server. If the host name does not match "*.net" then another I:line is used and because of "N" flag, the IP address is used for these clients, even if the host @@ -945,6 +955,7 @@ ======================= How to become the IRC administrator on your site + `Introduction' To become an IRC Administrator, IRC must know who is authorized to become an operator and what their "Nickname" and "Password" is. @@ -994,6 +1005,7 @@ This field contains flags of an O:line; flags are one character in size, can be combined and their order does not matter. They define privileges of an operator. + * L - local operator (disables all remote functions) * P - removes penalty @@ -1063,6 +1075,7 @@ ===================== Remove an errant user from IRC on your site. + `Introduction' Obviously it is hoped that you wouldn't have to use this command. Unfortunately sometimes a user can become unmanageable and this is @@ -1168,6 +1181,7 @@ ======================= Remove an errant user from IRC on your site. + `Introduction' Obviously it is hoped that you wouldn't have to use this command. Unfortunately sometimes a virus can become difficult to remove by @@ -1217,13 +1231,14 @@ How to connect to other servers, How other servers can connect to you - `WARNING:' The hostnames used as examples are really only examples + *WARNING:* The hostnames used as examples are really only examples and not meant to be used (simply because they don't work) in real life. Now you must decide WHICH hosts you want to connect to and WHAT ORDER you want to connect to them in. For my example let us assume I am on the machine "rieska.oulu.fi" and I want to connect to irc daemons on 3 other machines: + * "garfield.mit.edu" - Tertiary Connection * "irc.nada.kth.se" - Secondary Connection @@ -1238,6 +1253,7 @@ PLEASE limit the number of hosts you will attempt to connect to down to 3. This is because of two main reasons: + 1. to save your server from causing extra load and delays to users 2. to save internet from extra network traffic (remember the old @@ -1287,7 +1303,9 @@ TARGET host, and your host will accept connections FROM the TARGET host instead. The port field can contain 2 ports, separated by a . In this case, the first port is used when auto-connecting, the - second port is used for the UDP pings to the targer server. + second port is used for the UDP pings to the targer server. It + can be negative to disable autoconnects, absolute value will be + used to connect when CONNECT command with port "0" is used. `Class' The class field should refer to an existing class and determines @@ -1303,11 +1321,12 @@ with ZIP_LINKS defined, and use a _lowercase_ C line. `NEW!!!' - As of the 2.11.0 version of the server, `Source IP' field has been + As of the 2.11.0 version of the server, *Source IP* field has been added. Some examples: + * C:nic.funet.fi::nic.funet.fi:6667:1 This reads: Connect to host "nic.funet.fi", with no password and expect this server to identify itself to you as "nic.funet.fi". Your machine will @@ -1328,7 +1347,7 @@ Now back to our original problem, we wanted OUR server CONNECT to 3 hosts, "nic.funet.fi", "irc.nada.kth.se" and "garfield.mit.edu" in that order. So as we enter these entries into the file they must be -done in `reverse' order of how we could want to connect to them. +done in *reverse* order of how we could want to connect to them. Here's how it would look if we connected "nic.funet.fi" first: @@ -1339,7 +1358,7 @@ Ircd will attempt to connect to nic.funet.fi first, then to irc.nada and finally to garfield. - `Reciprocal entries:' Each "C" entry requires a corresponding "N" + *Reciprocal entries:* Each "C" entry requires a corresponding "N" entry that specifies connection priviliges to other hosts. The "N" entry contains the password, if any, that you require other hosts to have before they can connect to you. These entries are of the same @@ -1419,7 +1438,7 @@ If the wildcard count would be 2, then the wildcard domain would be "*.fi". Note that with wildcard name "*.fi" you could NOT connect to "nic.funet.fi" because that would result in a server - name `collision' (*.fi matches nic.funet.fi). + name *collision* (*.fi matches nic.funet.fi). I advise you to not to use wildcard servers before you know for sure how they are used, they are mostly beneficial for backbones @@ -1597,9 +1616,9 @@ for servers matching the mask given in this field. `Server Type' - Both the `Version Mask' and the `Flags' should be prefixed with + Both the *Version Mask* and the *Flags* should be prefixed with the server type identification. This implementation uses the id - "`IRC"' (starting with version 2.10). + "*IRC*" (starting with version 2.10). `Examples' V:IRC/021001*::*:: @@ -1626,13 +1645,13 @@ is allowed. `Protocol Version' - Only the 4 first digit of the `Version Number' are standard: they + Only the 4 first digit of the *Version Number* are standard: they define the protocol version. The remaining of the string is implementation dependant; matches on this part should be used with particular identification. `Flags' - are not standard. Therefore, this field `should always' contain a + are not standard. Therefore, this field *should always* contain a specific identification. @@ -1643,6 +1662,7 @@ ====================== Disallowing SERVERS in your irc net. + `Introduction' In some cases people run into difficulties in net administration. For one reason or another you do not want a certain server to be @@ -1652,8 +1672,8 @@ in Q-line, everytime some server link tries to introduce you a server (remember, all server names are broadcast around the net), that name is checked if it matches the Q-lines in your server. If - it matches, then `your server' disconnects the link. Note that just - placing Q-lines to your server probably results in `your server' + it matches, then *your server* disconnects the link. Note that just + placing Q-lines to your server probably results in *your server* being left alone, unless other servers have agreed to have the same Q-line in their ircd configuration files as well. @@ -1708,8 +1728,8 @@ channels or issue certain commands although most are available to it. Services are rejected upon sending an unknown or unallowed command. Services however, are not affected by flood control and - can be granted special privileges. It is therefore `wise to - oversee the use of S-lines with much care.' + can be granted special privileges. It is therefore *wise to + oversee the use of S-lines with much care.*  @@ -1784,27 +1804,27 @@ `Mailing list' A list is dedicated to the people using ircd. If you have trouble running ircd, or wish to discuss the future, you can subscribe by - sending an email to majordomo@irc.org, with "`subscribe - ircd-users"' in the body. + sending an email to `majordomo@irc.org', with "*subscribe + ircd-users*" in the body. If you just have a question and don't want to subscribe to the - list, mail to ircd-users@irc.org. Be sure to indicate which + list, mail to `ircd-users@irc.org'. Be sure to indicate which version you are using. `Development' Technical discussions and development are carried on ircd-dev@irc.org. People interested in very early testing, and/or working on the source code are welcome. This is done by sending - an email to majordomo@irc.org, with "`subscribe ircd-dev"' in the - body. + an email to `majordomo@irc.org', with "*subscribe ircd-dev*" in + the body. `FAQ' It can be found on the WWW, at - (http://www.irc.org/tech_docs/ircnet/faq.html). + `http://www.irc.org/tech_docs/ircnet/faq.html'. `WWW' Several pages related to the ircd: - (http://www.irc.org/techie.html). + `http://www.irc.org/techie.html'.  @@ -1829,6 +1849,7 @@ To save everyone time, make sure that your e-mail contains all the information related to your problem. In particular, we need to know: + `Package version' The IRC software version you are using: please include the output obtained by running "irc -v" for the client, and/or "ircd -v" for @@ -1859,50 +1880,50 @@ 6.2 Where to send a bug report ============================== -Reports should be sent to ircd-bugs@irc.org. Your report will be +Reports should be sent to `ircd-bugs@irc.org'. Your report will be reviewed and forwarded to the appropriate mailing list.  Tag Table: -Node: Top125 -Node: Installing IRC-648 -Node: The configure script877 -Node: Notes for Cygwin32 users3175 -Node: Notes concerning IPv6 support3916 -Node: The config-h file4404 -Node: DEBUGMODE5006 -Node: CHROOTDIR5591 -Node: USERS_RFC1459 USERS_SHOWS_UTMP5972 -Node: ENABLE_SUMMON6560 -Node: DEFAULT_INVISIBLE6881 -Node: OPER_KILL OPER_CONNECT OPER_DIE OPER_REHASH OPER_RESTART OPER_SET---7214 -Node: ZIP_LINKS ZIP_LEVEL7746 -Node: SLOW_ACCEPT8791 -Node: CLONE_CHECK9429 -Node: LOG_SERVER_CHANNELS9804 -Node: Other #define's10087 -Node: Editing the Makefile and compiling10427 -Node: The ircd-conf file12153 -Node: Machine information14654 -Node: Administrative info17280 -Node: Port connections19441 -Node: Connection Classes21966 -Node: Client connections28179 -Node: Operator priviliges33964 -Node: Excluded accounts37334 -Node: X Excluded accounts41255 -Node: Server connections43018 -Node: Deny auto-connections51616 -Node: Hub connections53195 -Node: Leaf connections54693 -Node: Version limitations56787 -Node: Excluded machines58555 -Node: Service connections59870 -Node: Bounce server61474 -Node: Related resources63345 -Node: Reporting a bug64388 -Node: How to report a bug64649 -Node: Where to send a bug report65668 +Node: Top133 +Node: Installing IRC-654 +Node: The configure script883 +Node: Notes for Cygwin32 users3182 +Node: Notes concerning IPv6 support3919 +Node: The config-h file4407 +Node: DEBUGMODE5009 +Node: CHROOTDIR5594 +Node: USERS_RFC1459 USERS_SHOWS_UTMP5975 +Node: ENABLE_SUMMON6563 +Node: DEFAULT_INVISIBLE6884 +Node: OPER_KILL OPER_CONNECT OPER_DIE OPER_REHASH OPER_RESTART OPER_SET---7217 +Node: ZIP_LINKS ZIP_LEVEL7749 +Node: SLOW_ACCEPT8792 +Node: CLONE_CHECK9430 +Node: LOG_SERVER_CHANNELS9805 +Node: Other #define's10088 +Node: Editing the Makefile and compiling10428 +Node: The ircd-conf file12154 +Node: Machine information14656 +Node: Administrative info17282 +Node: Port connections19443 +Node: Connection Classes21971 +Node: Client connections28187 +Node: Operator priviliges33974 +Node: Excluded accounts37345 +Node: X Excluded accounts41267 +Node: Server connections43031 +Node: Deny auto-connections51770 +Node: Hub connections53349 +Node: Leaf connections54847 +Node: Version limitations56941 +Node: Excluded machines58709 +Node: Service connections60025 +Node: Bounce server61629 +Node: Related resources63500 +Node: Reporting a bug64549 +Node: How to report a bug64810 +Node: Where to send a bug report65830  End Tag Table diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.sgml ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.sgml --- ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.sgml 2008-06-13 17:55:50.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.sgml 2010-08-11 17:36:56.000000000 +0000 @@ -4,7 +4,7 @@ Installing IRC - The Internet Relay Chat Program <author>SGML version by Christophe Kalt, updated by Piotr Kucharski -<date>$Id: INSTALL.sgml,v 1.86 2008/06/13 17:55:50 chopin Exp $ +<date>$Id: INSTALL.sgml,v 1.87 2010/08/11 17:36:56 bif Exp $ <abstract> This document describes how to install, and configure IRC 2.11 </abstract> @@ -971,6 +971,8 @@ The port field can contain 2 ports, separated by a . In this case, the first port is used when auto-connecting, the second port is used for the UDP pings to the targer server. +It can be negative to disable autoconnects, absolute value +will be used to connect when CONNECT command with port ``0'' is used. <tag/Class/ The class field should refer to an existing class and determines the maximum number of simultaneous uses of the C-line allowable through the max. links field in the diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.txt ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.txt --- ircd-irc2-2.11.2p2+dfsg/doc/INSTALL.txt 2008-06-13 17:55:50.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/INSTALL.txt 2010-08-11 17:36:56.000000000 +0000 @@ -1,6 +1,6 @@ Installing IRC - The Internet Relay Chat Program SGML version by Christophe Kalt, updated by Piotr Kucharski - $Id: INSTALL.txt,v 1.86 2008/06/13 17:55:50 chopin Exp $ + $Id: INSTALL.txt,v 1.87 2010/08/11 17:36:56 bif Exp $ This document describes how to install, and configure IRC 2.11 @@ -70,13 +70,12 @@ ----eennaabbllee--ddssmm Enable Dynamically Shared Modules support for iauth - 11..22.. NNootteess ffoorr CCyyggwwiinn3322 uusseerrss - The daemon of 2.11 release compiles properly on W32 systems which - have the GNU-Win32 environment ( <http://www.cygwin.com/>) setup. At - the time of the release, tests were made using the version b20.1 of - the Cygwin32 library. + The daemon of 2.11 release compiles properly on W32 systems which have + the GNU-Win32 environment ( <http://www.cygwin.com/>) setup. At the + time of the release, tests were made using the version b20.1 of the + Cygwin32 library. When compiling on such system, you want to make sure that you have carefully followed the Cygwin32 installation notes. @@ -85,7 +84,6 @@ the resolver. This file can be anywhere (see configure options), and is typically in //eettcc on UNIX systems. - 11..33.. NNootteess ccoonncceerrnniinngg IIPPvv66 ssuuppppoorrtt This version was tested on the following IPv6 systems: BSD/OS+KAME, @@ -95,14 +93,12 @@ sseeppaarraattoorr ffoorr tthhee sseerrvveerr ccoonnffiigguurraattiioonn ffiillee iiss cchhaannggeedd ttoo ````%%''''. You can adjust it to your needs in config.h file. - 22.. TThhee ccoonnffiigg..hh ffiillee The second step consists of defining options before the compilation. This is done by editing the ``config.h'' file and changing the various #DEFINE's. - 22..11.. DDEEBBUUGGMMOODDEE TThhiiss sshhoouulldd oonnllyy bbee ddeeffiinneedd ffoorr tteesstt ppuurrppoosseess,, aanndd nneevveerr uusseedd oonn aa @@ -115,7 +111,6 @@ this induces a large overhead for the server as it does a large amount of self diagnostics whilst running. - 22..22.. CCHHRROOOOTTDDIIRR To use the CHROOTDIR feature, make sure it is #define'd and that the @@ -123,7 +118,6 @@ setting up chroot environment for ircd and run it from there, not requiring to run as root. - 22..33.. UUSSEERRSS__RRFFCC11445599,, UUSSEERRSS__SSHHOOWWSS__UUTTMMPP Leaving USERS_RFC1459 undefined makes ircd return RPL_LOCALUSERS and @@ -134,19 +128,18 @@ which can be used to glean information the same as finger can. + 22..44.. EENNAABBLLEE__SSUUMMMMOONN ENABLE_SUMMON toggles whether the server will attempt to summon local users to irc by writing a message similar to that from talk(1) to a user's tty. - 22..55.. DDEEFFAAUULLTT__IINNVVIISSIIBBLLEE The DEFAULT_INVISIBLE define is used to toggle whether clients are automatically made invisible when they register. - 22..66.. OOPPEERR__KKIILLLL,, OOPPEERR__CCOONNNNEECCTT,, OOPPEERR__DDIIEE,, OOPPEERR__RREEHHAASSHH,, OOPPEERR__RREESSTTAARRTT,, OOPPEERR__SSEETT...... @@ -154,7 +147,6 @@ O:line flags. Some admins may prefer to feel more safe by undefining some of above thus disabling access to corresponding command at all. - 22..77.. ZZIIPP__LLIINNKKSS,, ZZIIPP__LLEEVVEELL As of the 2.9.3 version of the server, server-server connections may @@ -172,7 +164,6 @@ <ftp://ds.internic.net/rfc/rfc1950.txt> (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). - 22..88.. SSLLOOWW__AACCCCEEPPTT This option is undefined by default, however is needed on some OSes. @@ -185,7 +176,6 @@ abused (fast massive join of clonebots..), for these reasons, if you decide to keep SLOW_ACCEPT undefined you MUST define CLONE_CHECK. - 22..99.. CCLLOONNEE__CCHHEECCKK This option is defined by default and acts as a wrapper, by checking @@ -193,14 +183,11 @@ the server will not accept more than 10 connections from the same host within 2 seconds. - - 22..1100.. LLOOGG__SSEERRVVEERR__CCHHAANNNNEELLSS This option allows you to log to files server channels (like &NOTICES) chosen via LOG_SCH_* defines. Very handy. - 22..1111.. OOtthheerr ##ddeeffiinnee''ss The rest of the user changable #define's should be pretty much self @@ -253,7 +240,6 @@ ircd.users, ircd.rejects, ircd.auth, ircd.opers, ircd.debug, iauth.debug in PREFIX/var/log/. - 44.. TThhee iirrccdd..ccoonnff ffiillee After installing the ircd and irc programs, edit the ircd.conf file as @@ -274,6 +260,7 @@ 3. Port connections (P) + 4. Connection Classes (Y) 5. Client connections (I,i) @@ -329,7 +316,6 @@ slash, ircd config directory is prepended. Also note that chkconf will follow such includes. - 44..11.. MMaacchhiinnee iinnffoorrmmaattiioonn @@ -340,6 +326,7 @@ FFoorrmmaatt + M:<Server NAME>:<YOUR Internet IP#>:<Geographic Location>:<Port>:<SID>: @@ -393,13 +380,12 @@ This line reads: My Hosts name is ``orion.cair.du.edu'', my site is located in ``Denver Colorado, USA'' and my SID is ``00PS''. + NNoottee Using ``*'' as <Your Internet IP> allows OS to choose best outgoing source IP. See also SSeerrvveerr CCoonnnneeccttiioonnss section for configuring source IP of outgoing connections. - - 44..22.. AAddmmiinniissttrraattiivvee iinnffoo @@ -407,7 +393,6 @@ The ``A'' line is used for administrative information about a site. The e-mail address of the person running the server should be included here in case problems arise. - FFoorrmmaatt A:<Your Name/Location>:<Your E-Mail Addr>:<other>::<network name>: @@ -458,7 +443,6 @@ will typically be longer than 80 characters and will therefore wrap around the screen. - 44..33.. PPoorrtt ccoonnnneeccttiioonnss @@ -533,7 +517,6 @@ You need at least one P-line or server won't start. (Unless you run it from inetd.) - 44..44.. CCoonnnneeccttiioonn CCllaasssseess @@ -590,6 +573,7 @@ SSeennddQQ This field defines the ``SendQ'' (data awaiting to be sent to the client) value for this class. The format is <x>.<y> + +o x: defines maximum size of sendq, defaults to QUEUELEN if unset. @@ -607,7 +591,6 @@ user@host (IP) will be allowed. Read note below. Any unset value defaults to 1 (one). - GGlloobbaall lliimmiitt This field has the same use as the ``Local limit'' field. But, the connection counts are done for all clients present on the @@ -674,7 +657,6 @@ config.h for details. Y:2:60:0:50:20000:2.1:5: (client class) - In case of a client class, the fields are interpreted a bit differently. This class (number 2) can be used by up to 50 users. The connections are allowed to remain silent for 60 @@ -692,7 +674,6 @@ matter how many different /24 networks are using this Y:line, each will have separate count. - 44..55.. CClliieenntt ccoonnnneeccttiioonnss How to let clients connect to your IRCD. @@ -742,7 +723,6 @@ server be the same as the one given before the ``@''. Wildcards are permitted, but pplleeaassee rather leave this field empty and use bitmask in HHoosstt AAddddrr field. - Empty field matches any. ``*'' also matches any, but it requires working DNS for a client. @@ -785,7 +765,6 @@ change, no kick). Such users will also have their username prefixed by +, = or - depending on the ident reply. - NNoottee The server checks if the client hostname matches the TTAARRGGEETT HHoosstt NNAAMMEE field. If a match is found, server checks TTAARRGGEETT HHoosstt AAddddrr @@ -810,7 +789,6 @@ following line: I:::*.edu.edu::1 - and allow any clients from machines whose names end in ``.edu.edu'' to connect with no password. @@ -856,12 +834,10 @@ ``135.11.35.0/24'' to connect to the server. If the host name is known, is it used as address for these clients. - NNEEWW!!!!!! As of the 2.11.0 version of the server, I: line flags are introduced. - 44..66.. OOppeerraattoorr pprriivviilliiggeess How to become the IRC administrator on your site @@ -944,6 +920,7 @@ +o K - allows local and remote KILL + +o k - allows local KILL +o l - allows CLOSE @@ -982,8 +959,6 @@ Some privileges may be disabled during compilation time in config.h. - - 44..77.. EExxcclluuddeedd aaccccoouunnttss Remove an errant user from IRC on your site. @@ -1050,6 +1025,8 @@ EExxaammpplleess K:orion.cair.du.edu::jtrim:0: + + If user ``jtrim'' connects to IRC from host ``orion.cair.du.edu'' then IMMEDIATELY REMOVE HIM from my IRCD. @@ -1089,7 +1066,6 @@ ``192.11.35.0/24'' and which didn't resolve to login to the ircd. - 44..88.. XX EExxcclluuddeedd aaccccoouunnttss Remove an errant user from IRC on your site. @@ -1116,6 +1092,7 @@ Given field will be matched against corresponding parameter of client USER command. If left empty it matches any. It may contain wildcards. + NNiicckk If left empty it matches any. It may contain wildcards. @@ -1141,6 +1118,7 @@ If user registers with the following NICK and USER commands + NICK woof USER abc anything anything :def @@ -1151,7 +1129,6 @@ You need to compile server with #define XLINE to get this functionality. - 44..99.. SSeerrvveerr ccoonnnneeccttiioonnss How to connect to other servers, How other servers can connect to you @@ -1235,7 +1212,9 @@ TARGET host instead. The port field can contain 2 ports, separated by a . In this case, the first port is used when auto- connecting, the second port is used for the UDP pings to the - targer server. + targer server. It can be negative to disable autoconnects, + absolute value will be used to connect when CONNECT command with + port ``0'' is used. CCllaassss The class field should refer to an existing class and determines @@ -1271,6 +1250,7 @@ this host. This connection will use (your) source IP of ``192.168.0.18''. + +o C:irc.nada.kth.se::irc.nada.kth.se:1 This reads: do not attempt to autoconnect to ``irc.nada.kth.se'', @@ -1383,8 +1363,6 @@ sure how they are used, they are mostly beneficial for backbones of countries and other large areas with common domain. - - 44..1100.. DDeennyy aauuttoo--ccoonnnneeccttiioonnss @@ -1436,7 +1414,6 @@ if a server defined to be in class ``2'' is currently present on the network. - 44..1111.. HHuubb ccoonnnneeccttiioonnss @@ -1446,6 +1423,7 @@ may ``hub for''. If a server is only going to supply its own name (ie act as a solitary leaf) then no H-line is required for, else a H-line must be added. + FFoorrmmaatt H:<Server Mask>:<SID Mask>:<Server Name>:: @@ -1471,7 +1449,6 @@ Allows a server named ``*.bu.edu'' to introduce only servers that match the ``*.edu'' name mask, no matter what SID they have. - H:*:616*:eff.org:: Allows ``eff.org'' to introduce (and act as a hub for) any @@ -1541,7 +1518,6 @@ introduced and the server which is responsible for introducing this new server. - 44..1133.. VVeerrssiioonn lliimmiittaattiioonnss @@ -1605,8 +1581,6 @@ FFllaaggss are not standard. Therefore, this field sshhoouulldd aallwwaayyss contain a specific identification. - - 44..1144.. EExxcclluuddeedd mmaacchhiinneess Disallowing SERVERS in your irc net. @@ -1633,7 +1607,6 @@ is given to be security holes (you should give a reason, it is polite). The first field is unused, so leave it empty. - 44..1155.. SSeerrvviiccee ccoonnnneeccttiioonnss @@ -1680,7 +1653,6 @@ control and can be granted special privileges. It is therefore wwiissee ttoo oovveerrsseeee tthhee uussee ooff SS--lliinneess wwiitthh mmuucchh ccaarree.. - 44..1166.. BBoouunnccee sseerrvveerr @@ -1744,7 +1716,6 @@ Clients that connected to server-only port should really use port 6667. - 55.. RReellaatteedd rreessoouurrcceess @@ -1773,14 +1744,11 @@ Several pages related to the ircd: <http://www.irc.org/techie.html>. - - 66.. RReeppoorrttiinngg aa bbuugg If you encounter a bug in the software, here is how and where to report it. - 66..11.. HHooww ttoo rreeppoorrtt aa bbuugg To save everyone time, make sure that your e-mail contains all the @@ -1809,6 +1777,7 @@ If you have a fix, don't forget to include it. + 66..22.. WWhheerree ttoo sseenndd aa bbuugg rreeppoorrtt Reports should be sent to ircd-bugs@irc.org. Your report will be diff -Nru ircd-irc2-2.11.2p2+dfsg/doc/RELEASE_LOG ircd-irc2-2.11.2p3~dfsg/doc/RELEASE_LOG --- ircd-irc2-2.11.2p2+dfsg/doc/RELEASE_LOG 2009-11-13 20:31:32.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/doc/RELEASE_LOG 2010-08-13 19:59:43.000000000 +0000 @@ -1,5 +1,6 @@ -# @(#)$Id: RELEASE_LOG,v 1.20 2009/11/13 20:31:32 chopin Exp $ +# @(#)$Id: RELEASE_LOG,v 1.21 2010/08/13 19:59:43 bif Exp $ +2010-08-13 2.11.2p3 2009-11-13 2.11.2p2 2008-06-24 2.11.2p1 2008-06-13 2.11.2 diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/channel.c ircd-irc2-2.11.2p3~dfsg/ircd/channel.c --- ircd-irc2-2.11.2p2+dfsg/ircd/channel.c 2009-11-13 19:32:44.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/channel.c 2010-08-12 16:23:14.000000000 +0000 @@ -32,7 +32,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: channel.c,v 1.278 2009/11/13 19:32:44 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: channel.c,v 1.279 2010/08/12 16:23:14 bif Exp $"; #endif #include "os.h" @@ -609,11 +609,6 @@ member = IsMember(cptr, chptr); lp = find_user_link(chptr->members, cptr); - if ((!lp || !(lp->flags & (CHFL_CHANOP | CHFL_VOICE))) && - !match_modeid(CHFL_EXCEPTION, cptr, chptr) && - match_modeid(CHFL_BAN, cptr, chptr)) - return (MODE_BAN); - if (chptr->mode.mode & MODE_MODERATED && (!lp || !(lp->flags & (CHFL_CHANOP|CHFL_VOICE)))) return (MODE_MODERATED); @@ -621,6 +616,22 @@ if (chptr->mode.mode & MODE_NOPRIVMSGS && !member) return (MODE_NOPRIVMSGS); + /* checking +be is not reliable for remote clients for case + ** when exception is in cidr format. working around that is + ** horrible. basically inet_pton for each UNICK and keeping + ** it in client struct, plus dealing somehow with non-inet6 + ** servers getting inet6 clients ips from remote servers... + ** in short it seems better to allow remote clients to just + ** talk, trusting a bit remote servers, than to reject good + ** messages. --B. */ + if (!MyConnect(cptr)) + return 0; + + if ((!lp || !(lp->flags & (CHFL_CHANOP | CHFL_VOICE))) && + !match_modeid(CHFL_EXCEPTION, cptr, chptr) && + match_modeid(CHFL_BAN, cptr, chptr)) + return (MODE_BAN); + return 0; } diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/ircd.c ircd-irc2-2.11.2p3~dfsg/ircd/ircd.c --- ircd-irc2-2.11.2p2+dfsg/ircd/ircd.c 2009-11-13 20:08:11.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/ircd.c 2010-08-11 17:39:00.000000000 +0000 @@ -19,7 +19,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: ircd.c,v 1.164 2009/11/13 20:08:11 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: ircd.c,v 1.165 2010/08/11 17:39:00 bif Exp $"; #endif #include "os.h" @@ -81,6 +81,22 @@ logfiles_close(); ircd_writetune(tunefile); flush_connections(me.fd); +#ifdef UNIXPORT + { + aClient *acptr; + char unixpath[256]; + for (acptr = ListenerLL; acptr; acptr = acptr->next) + { + if (IsUnixSocket(acptr)) + { + sprintf(unixpath, "%s/%d", + acptr->confs->value.aconf->host, + acptr->confs->value.aconf->port); + (void)unlink(unixpath); + } + } + } +#endif exit(-1); } diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_bsd.c ircd-irc2-2.11.2p3~dfsg/ircd/s_bsd.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_bsd.c 2008-06-08 15:57:07.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_bsd.c 2010-08-13 19:58:46.000000000 +0000 @@ -35,7 +35,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_bsd.c,v 1.186 2008/06/08 15:57:07 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_bsd.c,v 1.187 2010/08/13 19:58:46 bif Exp $"; #endif #include "os.h" @@ -3491,7 +3491,7 @@ * log such crap. * * Based on Ari `DLR' Heikkinen <aheikin@dlr.pspt.fi> irce0.9.1 - * by Piotr `Beeth' Kucharski <chopin@sgh.waw.pl> + * by Piotr `Beeth' Kucharski <chopin@42.pl> * * Note: calling with fd == -2 closes all delayed fds. */ diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_conf.c ircd-irc2-2.11.2p3~dfsg/ircd/s_conf.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_conf.c 2009-11-13 20:25:55.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_conf.c 2010-08-11 17:16:51.000000000 +0000 @@ -48,7 +48,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_conf.c,v 1.192 2009/11/13 20:25:55 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_conf.c,v 1.195 2010/08/11 17:16:51 bif Exp $"; #endif #include "os.h" @@ -2694,13 +2694,16 @@ { err = 1; } - if (!strcmp("@*", user) || !strcmp("*@", user) || !strcmp("@", user)) + if (host) { - /* Note that we don't forbid "*@*", only those, that lack - ** some crucial parts, which can be seen as a typo. --Beeth */ + *host++ = '\0'; + } + if (!user || !host || *user == '\0' || *host == '\0' || + (!strcmp("*", user) && !strcmp("*", host))) { + /* disallow all forms of bad u@h format and block *@* too */ err = 1; } - if (strchr(host, '/') && match_ipmask(host, sptr, 0) == -1) + if (!err && host && strchr(host, '/') && match_ipmask(host, sptr, 0) == -1) { /* check validity of 1.2.3.0/24 or it will be spewing errors ** for every connecting client. */ @@ -2709,7 +2712,7 @@ #ifdef KLINE badkline: #endif - if (err || !host) + if (err) { /* error */ if (!IsPerson(sptr)) @@ -2731,7 +2734,6 @@ status = tkline ? CONF_TOTHERKILL : CONF_OTHERKILL; user++; } - *host++ = '\0'; #ifdef INET6 host = ipv6_convert(host); #endif diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_err.c ircd-irc2-2.11.2p3~dfsg/ircd/s_err.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_err.c 2008-06-21 11:59:52.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_err.c 2010-08-12 16:24:31.000000000 +0000 @@ -18,7 +18,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_err.c,v 1.70 2008/06/21 11:59:52 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_err.c,v 1.71 2010/08/12 16:24:31 bif Exp $"; #endif #include "os.h" @@ -246,7 +246,7 @@ /* 215 RPL_STATSILINE */ ":%s 215 %s %c %s %s %s %d %d %s", /* 216 RPL_STATSKLINE */ ":%s 216 %s %c %s %s %s %d %d", /* 217 RPL_STATSQLINE */ ":%s 217 %s %c %s %s %s %d %d", -/* 218 RPL_STATSYLINE */ ":%s 218 %s %c %d %d %d %d %ld.%ld %d.%d %d.%d %d%s", +/* 218 RPL_STATSYLINE */ ":%s 218 %s %c %d %d %d %d %d.%d %d.%d %d.%d %d%s", /* 219 RPL_ENDOFSTATS */ ":%s 219 %s %c :End of STATS report", /* 220 */ (char *)NULL, /* 221 RPL_UMODEIS */ ":%s 221 %s %s", diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_serv.c ircd-irc2-2.11.2p3~dfsg/ircd/s_serv.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_serv.c 2009-11-13 20:08:11.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_serv.c 2010-08-12 16:24:31.000000000 +0000 @@ -22,7 +22,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_serv.c,v 1.297 2009/11/13 20:08:11 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_serv.c,v 1.298 2010/08/12 16:24:31 bif Exp $"; #endif #include "os.h" @@ -1864,7 +1864,7 @@ int m_stats(aClient *cptr, aClient *sptr, int parc, char *parv[]) { - static char Lformat[] = ":%s %d %s %s %u %lu %llu %lu %llu :%u"; + static char Lformat[] = ":%s %d %s %s %u %lu %llu %lu %llu :%d"; struct Message *mptr; aClient *acptr; char stat = parc > 1 ? parv[1][0] : '\0'; @@ -1983,7 +1983,7 @@ (int)DBufLength(&acptr->sendQ), acptr->sendM, acptr->sendB, acptr->receiveM, acptr->receiveB, - timeofday - acptr->firsttime); + (int)(timeofday - acptr->firsttime)); } } else @@ -1995,7 +1995,7 @@ (int)DBufLength(&acptr->sendQ), acptr->sendM, acptr->sendB, acptr->receiveM, acptr->receiveB, - timeofday - acptr->firsttime); + (int)(timeofday - acptr->firsttime)); } break; @@ -2780,7 +2780,7 @@ acptr->from->name, acptr->from->serv->version, (acptr->from->flags & FLAGS_ZIP) ? "z" : "", - timeofday - acptr->from->firsttime, + (int)(timeofday - acptr->from->firsttime), (int)DBufLength(&acptr->from->sendQ), (int)DBufLength(&sptr->from->sendQ)); diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_service.c ircd-irc2-2.11.2p3~dfsg/ircd/s_service.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_service.c 2008-06-08 06:37:46.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_service.c 2010-08-12 01:08:02.000000000 +0000 @@ -22,7 +22,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_service.c,v 1.68 2008/06/08 06:37:46 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_service.c,v 1.69 2010/08/12 01:08:02 bif Exp $"; #endif #include "os.h" @@ -498,7 +498,7 @@ if (!(bcptr = local[fdas.fd[i]]) || !IsServer(bcptr) || bcptr == cptr) continue; - if (match(dist, bcptr->name)) + if (match(dist, bcptr->name) && match(dist, bcptr->serv->sid)) continue; sendto_one(bcptr, ":%s SERVICE %s %s %d :%s", diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/s_user.c ircd-irc2-2.11.2p3~dfsg/ircd/s_user.c --- ircd-irc2-2.11.2p2+dfsg/ircd/s_user.c 2009-03-15 01:47:29.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/s_user.c 2010-08-12 16:29:30.000000000 +0000 @@ -22,7 +22,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)$Id: s_user.c,v 1.278 2009/03/15 01:47:29 chopin Exp $"; +static const volatile char rcsid[] = "@(#)$Id: s_user.c,v 1.280 2010/08/12 16:29:30 bif Exp $"; #endif #include "os.h" @@ -655,7 +655,7 @@ { /* I think this is not possible anymore. --B. */ sendto_one(cptr, ":%s KILL %s :%s (%s != %s[%s])", - ME, sptr->name, ME, user->server, + ME, user->uid, ME, user->server, acptr->from->name, acptr->from->sockhost); sptr->flags |= FLAGS_KILLED; return exit_client(cptr, sptr, &me, @@ -877,8 +877,6 @@ "Bad NICK param count (%d) for %s from %s via %s", parc, parv[1], sptr->name, get_client_name(cptr, FALSE)); - sendto_one(cptr, ":%s KILL %s :%s (Bad NICK %d)", - ME, nick, ME, parc); buf[0] = '\0'; for (k = 1; k < parc; k++) { @@ -963,7 +961,7 @@ parv[1], parv[0], get_client_name(cptr, FALSE)); sendto_serv_butone(NULL, ":%s KILL %s :%s (%s[%s] != %s)", - me.name, sptr->name, me.name, + me.name, sptr->user->uid, me.name, sptr->name, sptr->from->name, get_client_name(cptr, TRUE)); sptr->flags |= FLAGS_KILLED; @@ -988,14 +986,14 @@ sendto_flag(SCH_KILL, "Bad Nick: %s From: %s %s", parv[1], parv[0], get_client_name(cptr, FALSE)); - sendto_one(cptr, ":%s KILL %s :%s (%s <- %s[%s])", - ME, parv[1], ME, parv[1], - nick, cptr->name); - if (sptr != cptr) /* bad nick change */ + if (sptr != cptr && sptr->user) /* bad nick change */ { + sendto_one(cptr, ":%s KILL %s :%s (%s <- %s[%s])", + ME, sptr->user->uid, ME, parv[1], + nick, cptr->name); sendto_serv_butone(cptr, ":%s KILL %s :%s (%s <- %s!%s@%s)", - ME, parv[0], ME, + ME, sptr->user->uid, ME, get_client_name(cptr, FALSE), parv[0], user, host); sptr->flags |= FLAGS_KILLED; @@ -2047,9 +2045,9 @@ if (acptr->user && MyConnect(acptr)) sendto_one(sptr, replies[RPL_WHOISIDLE], ME, BadTo(sptr->name), - name, timeofday - user->last + name, (long)(timeofday - user->last) #ifdef WHOIS_SIGNON_TIME - , acptr->firsttime + , (long)acptr->firsttime #endif ); } diff -Nru ircd-irc2-2.11.2p2+dfsg/ircd/version.c.SH.in ircd-irc2-2.11.2p3~dfsg/ircd/version.c.SH.in --- ircd-irc2-2.11.2p2+dfsg/ircd/version.c.SH.in 2004-12-28 20:55:12.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/ircd/version.c.SH.in 2010-08-13 19:58:46.000000000 +0000 @@ -51,7 +51,7 @@ */ #ifndef lint -static const volatile char rcsid[] = "@(#)\$Id: version.c.SH.in,v 1.13 2004/12/28 20:55:12 q Exp $"; +static const volatile char rcsid[] = "@(#)\$Id: version.c.SH.in,v 1.14 2010/08/13 19:58:46 bif Exp $"; #endif #include "os.h" @@ -80,7 +80,7 @@ "The following persons have made many changes and enhancements to the", "code and still know how IRC really works if you have questions about it:", "", - "Beeth Piotr Kucharski chopin@sgh.waw.pl", + "Beeth Piotr Kucharski chopin@42.pl", "", "Thanks to the following people for their work on 2.11:", "", @@ -97,8 +97,8 @@ "Jarkko Oikarinen", "Darren Reed Vesa Ruokonen", "Matthew Green Chuck Kane Matt Lyle", - "Markku Savela Greg Lindahl Armin Gruner", - "Stellan Klebom Dan Goodwin Mike Bolotski", + "Markku Savela Greg Lindahl Armin Gruner", + "Stellan Klebom Dan Goodwin Mike Bolotski", "Ian Frechette Markku Jarvinen Kimmo Suominen", "Jeff Trim Vijay Subramaniam Karl Kleinpaste", "Bill Wisner Tom Davis Hugo Calendar", diff -Nru ircd-irc2-2.11.2p2+dfsg/support/config.guess ircd-irc2-2.11.2p3~dfsg/support/config.guess --- ircd-irc2-2.11.2p2+dfsg/support/config.guess 2010-04-18 18:19:35.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/support/config.guess 2005-01-02 13:32:52.000000000 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2004-11-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -18,15 +17,13 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Originally written by Per Bothner <per@bothner.com>. # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted ChangeLog entry. @@ -56,8 +53,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -69,11 +66,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -107,7 +104,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -126,7 +123,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -161,7 +158,6 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -170,7 +166,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ + | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -200,23 +196,55 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit ;; + exit 0 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + luna88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; + exit 0 ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; + exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -269,43 +297,40 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit ;; + exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit ;; + exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit ;; + exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; + exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit ;; + exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition - exit ;; + exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit ;; + exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit ;; + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit ;; + exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -313,48 +338,32 @@ else echo pyramid-pyramid-bsd fi - exit ;; + exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit ;; + exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit ;; + exit 0 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; + sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -363,10 +372,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; + exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -378,10 +387,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit ;; + exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -392,40 +401,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit ;; + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; + exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -449,33 +458,32 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} - exit ;; + exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit ;; + exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit ;; + exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit ;; + exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit ;; + exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -491,29 +499,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit ;; + exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit ;; + exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit ;; + exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; + exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit ;; + exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -521,7 +529,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -536,19 +544,15 @@ exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit ;; - *:AIX:*:[456]) + exit 0 ;; + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -561,28 +565,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix - exit ;; + exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit ;; + exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit ;; + exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit ;; + exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit ;; + exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit ;; + exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -644,19 +648,9 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -664,11 +658,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -696,227 +690,202 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 - exit ;; + exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit ;; + exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit ;; + exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit ;; + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit ;; + exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit ;; + exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit ;; + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit ;; + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) + exit 0 ;; + i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; + exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit ;; + exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit ;; + exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; + exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit ;; + exit 0 ;; arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit ;; + exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit ;; + exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit ;; + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) + exit 0 ;; + mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + CPU=mips #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit ;; + exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit ;; + exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -927,13 +896,10 @@ EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep -q ld.so.1 + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; + exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -941,31 +907,25 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit ;; + exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit ;; + exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit ;; + exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; + exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -981,6 +941,17 @@ elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -997,7 +968,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1007,23 +978,16 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit ;; + exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -1031,27 +995,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; + exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit ;; + exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) + exit 0 ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1059,16 +1023,15 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + exit 0 ;; + i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` @@ -1086,86 +1049,73 @@ else echo ${UNAME_MACHINE}-pc-sysv32 fi - exit ;; + exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 - exit ;; + exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 - exit ;; + exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit ;; + exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit ;; + exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit ;; + exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit ;; + exit 0 ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit ;; + exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit ;; + exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1173,84 +1123,69 @@ else echo ns32k-sni-sysv fi - exit ;; + exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 - exit ;; + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit ;; + exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; + exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit ;; + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit ;; + exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit ;; + exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit ;; + exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit ;; + exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; + exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1258,25 +1193,22 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; + exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; + exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; + exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit ;; + exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit ;; + exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1287,50 +1219,41 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; + exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit ;; + exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit ;; + exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit ;; + exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit ;; + exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit ;; + exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its - exit ;; + exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit ;; + exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; + exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + A*) echo alpha-dec-vms && exit 0 ;; + I*) echo ia64-dec-vms && exit 0 ;; + V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1362,7 +1285,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); + printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1451,12 +1374,11 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) @@ -1465,22 +1387,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit ;; + exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; c34*) echo c34-convex-bsd - exit ;; + exit 0 ;; c38*) echo c38-convex-bsd - exit ;; + exit 0 ;; c4*) echo c4-convex-bsd - exit ;; + exit 0 ;; esac fi @@ -1491,9 +1413,7 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + ftp://ftp.gnu.org/pub/gnu/config/ If the version you run ($0) is already up to date, please send the following data and any information you think might be diff -Nru ircd-irc2-2.11.2p2+dfsg/support/config.h.dist ircd-irc2-2.11.2p3~dfsg/support/config.h.dist --- ircd-irc2-2.11.2p2+dfsg/support/config.h.dist 2009-11-13 20:25:55.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/support/config.h.dist 2010-08-13 19:53:03.000000000 +0000 @@ -544,7 +544,7 @@ * Defining to 0 disables entering split-mode. */ #define DEFAULT_SPLIT_USERS 65000 -#define DEFAULT_SPLIT_SERVERS 70 +#define DEFAULT_SPLIT_SERVERS 80 /* ** Notice sent to connecting users if the server is in the split-mode. diff -Nru ircd-irc2-2.11.2p2+dfsg/support/config.sub ircd-irc2-2.11.2p3~dfsg/support/config.sub --- ircd-irc2-2.11.2p2+dfsg/support/config.sub 2010-04-18 18:19:35.000000000 +0000 +++ ircd-irc2-2.11.2p3~dfsg/support/config.sub 2005-01-02 13:32:52.000000000 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2004-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -22,15 +21,14 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Please send patches to <config-patches@gnu.org>. Submit a context # diff and a properly formatted ChangeLog entry. # @@ -72,8 +70,8 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -85,11 +83,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -101,7 +99,7 @@ *local*) # First pass through any local machine types. echo $1 - exit ;; + exit 0;; * ) break ;; @@ -120,10 +118,8 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -153,9 +149,6 @@ os= basic_machine=$1 ;; - -bluegene*) - os=-cnk - ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -177,10 +170,6 @@ -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -197,10 +186,6 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -245,28 +230,22 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -275,26 +254,21 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | moxie \ - | mt \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ - | or32 \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -304,9 +278,6 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -326,32 +297,28 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ + | avr-* \ + | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -360,33 +327,26 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | mt-* \ | msp430-* \ - | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -450,10 +410,6 @@ basic_machine=m68k-apollo os=-bsd ;; - aros) - basic_machine=i386-pc - os=-aros - ;; aux) basic_machine=m68k-apple os=-aux @@ -462,26 +418,10 @@ basic_machine=ns32k-sequent os=-dynix ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -510,8 +450,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) - basic_machine=cr16-unknown + cr16c) + basic_machine=cr16c-unknown os=-elf ;; crds | unos) @@ -549,10 +489,6 @@ basic_machine=m88k-motorola os=-sysv3 ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -707,14 +643,6 @@ basic_machine=m68k-isi os=-sysv ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -730,10 +658,6 @@ basic_machine=i386-pc os=-mingw32 ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) basic_machine=m68000-convergent ;; @@ -759,9 +683,6 @@ basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -837,8 +758,9 @@ basic_machine=hppa1.1-oki os=-proelf ;; - openrisc | openrisc-*) + or32 | or32-*) basic_machine=or32-unknown + os=-coff ;; os400) basic_machine=powerpc-ibm @@ -860,14 +782,6 @@ basic_machine=i860-intel os=-osf ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; pbd) basic_machine=sparc-tti ;; @@ -877,12 +791,6 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -939,10 +847,6 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -969,10 +873,6 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -984,9 +884,6 @@ basic_machine=sh-hitachi os=-hms ;; - sh5el) - basic_machine=sh5le-unknown - ;; sh64) basic_machine=sh64-unknown ;; @@ -1076,10 +973,6 @@ basic_machine=tic6x-unknown os=-coff ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1155,10 +1048,6 @@ basic_machine=z8k-unknown os=-sim ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1197,10 +1086,13 @@ we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1267,30 +1159,26 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1308,7 +1196,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1420,9 +1308,6 @@ -zvmoe) os=-zvmoe ;; - -dicos*) - os=-dicos - ;; -none) ;; *) @@ -1445,12 +1330,6 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1460,9 +1339,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1488,9 +1367,6 @@ m68*-cisco) os=-aout ;; - mep-*) - os=-elf - ;; mips*-cisco) os=-elf ;; @@ -1509,9 +1385,6 @@ *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1620,7 +1493,7 @@ -sunos*) vendor=sun ;; - -cnk*|-aix*) + -aix*) vendor=ibm ;; -beos*) @@ -1683,7 +1556,7 @@ esac echo $basic_machine$os -exit +exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp)