]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Merge branch 'bug92-xop'
authorAlexander Barton <alex@barton.de>
Sun, 23 Sep 2012 17:58:50 +0000 (19:58 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 23 Sep 2012 18:06:14 +0000 (20:06 +0200)
By Alexander Barton (5) and Sebastian Köhler (2)

* bug92-xop:
  Fix NAMES/WHO response when client has multi-prefix
  Fix prefix of "halfop" when "multi-prefix" is active
  Clean up doc/.gitignore
  doc/Modes.txt: add version number to new channel modes
  Fix some "whitespace glitches"
  Tests and documentation for xop
  Implemented xop support

Conflicts (because of "multi-prefix fix"):
src/ngircd/irc-info.c

This fixes bug #92 "ngircd does not support XOP usermodes".

17 files changed:
autogen.sh
config.guess
config.sub
configure.in
doc/Makefile.am
man/Makefile.am
src/ipaddr/Makefile.am
src/ngircd/conf.c
src/ngircd/conn-ssl.c
src/ngircd/conn.c
src/ngircd/irc-login.c
src/ngircd/login.c
src/ngircd/ngircd.c
src/ngircd/parse.c
src/ngircd/sighandlers.c
src/portab/portab.h
src/tool/Makefile.am

index c87085ac5cf030356cdba9b1846bf984b78795fd..cca200b2a452d02478224566f135fdf0b8ca4eed 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2008 Alexander Barton <alex@barton.de>
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -98,6 +98,12 @@ Notfound()
        exit 1
 }
 
+Run()
+{
+       [ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
+       $@
+}
+
 # Reset locale settings to suppress warning messages of Perl
 unset LC_ALL
 unset LANG
@@ -125,13 +131,13 @@ fi
 # specifies one:
 echo "Searching tools ..."
 [ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
-[ "$VERBOSE" = "1" ] && echo "ACLOCAL=$ACLOCAL"
+[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
 [ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
-[ "$VERBOSE" = "1" ] && echo "AUTOHEADER=$AUTOHEADER"
+[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
 [ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
-[ "$VERBOSE" = "1" ] && echo "AUTOMAKE=$AUTOMAKE"
+[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
 [ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
-[ "$VERBOSE" = "1" ] && echo "AUTOCONF=$AUTOCONF"
+[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
 
 # Call ./configure when parameters have been passed to this script and
 # GO isn't already defined.
@@ -147,10 +153,10 @@ export ACLOCAL AUTOHEADER AUTOMAKE AUTOCONF
 
 # Generate files
 echo "Generating files ..."
-$ACLOCAL && \
-       $AUTOHEADER && \
-       $AUTOMAKE --add-missing && \
-       $AUTOCONF --force
+Run $ACLOCAL && \
+       Run $AUTOCONF && \
+       Run $AUTOHEADER && \
+       Run $AUTOMAKE --add-missing --no-force
 
 if [ $? -eq 0 -a -x ./configure ]; then
        # Success: if we got some parameters we call ./configure and pass
index d622a44e551f209d5e8c5462b3fe53a162f7b330..137bedf2e28b0e831b7b92b3a433d3fca5854a9b 100644 (file)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-14'
 
 # 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
@@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
        exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+       exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -801,6 +805,9 @@ EOF
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
@@ -1201,6 +1208,9 @@ EOF
     BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
        echo i586-pc-haiku
        exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1256,7 +1266,7 @@ EOF
     NEO-?:NONSTOP_KERNEL:*:*)
        echo neo-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1340,6 @@ EOF
        exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
index c894da45500c4af1bf5688e713a8895622d18182..bdda9e4a32c1811dfad72224cc32bca0fe3cba74 100644 (file)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-08-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -123,7 +123,7 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
@@ -225,6 +225,12 @@ case $os in
        -isc*)
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -lynx*178)
+               os=-lynxos178
+               ;;
+       -lynx*5)
+               os=-lynxos5
+               ;;
        -lynx*)
                os=-lynxos
                ;;
@@ -785,6 +791,10 @@ case $basic_machine in
        microblaze)
                basic_machine=microblaze-xilinx
                ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -1346,15 +1356,15 @@ case $os in
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* \
              | -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* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-android* \
-             | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1537,6 +1547,9 @@ case $basic_machine in
        c4x-* | tic4x-*)
                os=-coff
                ;;
+       hexagon-*)
+               os=-elf
+               ;;
        tic54x-*)
                os=-coff
                ;;
index 52435fd4df7b419f98de0b0305447ee75a1b9867..949a383a5089104c0f283fffa9cb050dd1746b8a 100644 (file)
@@ -13,39 +13,41 @@ define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d
 
 # -- Initialisation --
 
-AC_PREREQ(2.50)
-AC_INIT(ngircd, VERSION_ID)
-AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
-AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(1.6)
-AC_CONFIG_HEADER(src/config.h)
+AC_PREREQ([2.67])
+AC_INIT([ngIRCd], VERSION_ID,
+       [ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
+
+AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
+AC_CONFIG_HEADER([src/config.h])
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE([1.11])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # -- Templates for config.h --
 
 AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
+AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
 AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
+AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
+AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
+AH_TEMPLATE([PAM], [Define if PAM should be used])
 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
 AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
-AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
-AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
-AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests])
-AH_TEMPLATE([PAM], [Define if PAM should be used])
-AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists])
+AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 
-AH_TEMPLATE([TARGET_OS], [Target operating system name])
-AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
-AH_TEMPLATE([TARGET_CPU], [Target CPU name])
+AH_TEMPLATE([HOST_OS], [Target operating system name])
+AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
+AH_TEMPLATE([HOST_CPU], [Target CPU name])
 
 # -- C Compiler --
 
 AC_PROG_CC
 AC_PROG_CC_STDC
-AC_C_PROTOTYPES
 
 # -- Helper programs --
 
@@ -57,9 +59,9 @@ AC_PROG_RANLIB
 
 # -- Compiler Features --
 
-AM_C_PROTOTYPES
 AC_C_CONST
 AC_C_INLINE
+AM_C_PROTOTYPES
 
 # -- Hard coded system and compiler dependencies/features/options ... --
 
@@ -85,7 +87,7 @@ if test "$GCC" = "yes"; then
        GCC_STACK_PROTECT_CC
 fi
 
-case "$target_os" in
+case "$host_os" in
        hpux*)
                # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
                # (tested with HP/UX 11.11)
@@ -101,28 +103,20 @@ CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"
 # -- Headers --
 
 AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
 
+# Required header files
 AC_CHECK_HEADERS([ \
-       ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
-       stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
+       fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \
+       strings.h sys/socket.h sys/time.h unistd.h \
        ],,AC_MSG_ERROR([required C header missing!]))
 
-AC_CHECK_HEADERS([ \
-       arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
-       ],[],[],[[
-       #ifdef HAVE_SYS_TYPES_H
-               #include <sys/types.h>
-       #endif
-       #ifdef HAVE_SYS_SOCKET_H
-               #include <sys/socket.h>
-       #endif
-       #ifdef HAVE_NETINET_IN_H
-               #include <netinet/in.h>
-       #endif
-       ]]
-)
+# Optional header files
+AC_CHECK_HEADERS_ONCE([ \
+       arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \
+       stdint.h varargs.h \
+       ])
 
 # -- Datatypes --
 
@@ -139,33 +133,50 @@ AC_TRY_COMPILE([
        AC_MSG_RESULT(no)
 ])
 
+AC_TYPE_PID_T
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UID_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT8_T
 
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
  [#include <arpa/inet.h>])
 
 # -- Libraries --
 
-# A/UX needs this.
-AC_CHECK_LIB(UTIL,memmove)
-# needed on solaris. GNU libc also has a libnsl, but we do not need it.
-AC_SEARCH_LIBS(gethostbyname,nsl)
-AC_CHECK_LIB(socket,bind)
+# memmove: A/UX libUTIL
+AC_SEARCH_LIBS([memmove], [UTIL], [], [
+       AC_MSG_ERROR([unable to find the memmove() function])
+])
+# gethostbyname: Solaris libnsl
+AC_SEARCH_LIBS([gethostbyname], [nsl], [], [
+       AC_MSG_ERROR([unable to find the gethostbyname() function])
+])
+# bind: SVR4 libsocket
+AC_SEARCH_LIBS([bind], [socket], [], [
+       AC_MSG_ERROR([unable to find the bind() function])
+])
 
 # -- Functions --
 
 AC_FUNC_FORK
 AC_FUNC_STRFTIME
 
+# Required functions
 AC_CHECK_FUNCS([ \
-       bind gethostbyaddr gethostbyname gethostname inet_ntoa \
-       setsid setsockopt socket strcasecmp waitpid],,
+       alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
+       gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
+       strchr strcspn strerror strncasecmp strrchr strspn strstr \
+       ],,
        AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS([ \
-       gai_strerror getaddrinfo getnameinfo inet_aton sigaction \
-       sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r])
+# Optional functions
+AC_CHECK_FUNCS_ONCE([ \
+       gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \
+       snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid])
 
 # -- Configuration options --
 
@@ -173,22 +184,20 @@ AC_CHECK_FUNCS([ \
 
 x_syslog_on=no
 AC_ARG_WITH(syslog,
-       [  --without-syslog        disable syslog (autodetected by default)],
+       AS_HELP_STRING([--without-syslog],
+                      [disable syslog (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
                                CPPFLAGS="-I$withval/include $CPPFLAGS"
                                LDFLAGS="-L$withval/lib $LDFLAGS"
                        fi
-                       AC_CHECK_LIB(be, syslog)
-                       AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
+                       AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [
                                AC_MSG_ERROR([Can't enable syslog!])
-                       )
+                       ])
                fi
        ],
-       [
-               AC_CHECK_LIB(be, syslog)
-               AC_CHECK_FUNCS(syslog, x_syslog_on=yes)
+       [       AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes])
        ]
 )
 if test "$x_syslog_on" = "yes"; then
@@ -200,7 +209,8 @@ fi
 
 x_zlib_on=no
 AC_ARG_WITH(zlib,
-       [  --without-zlib          disable zlib compression (autodetected by default)],
+       AS_HELP_STRING([--without-zlib],
+                      [disable zlib compression (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -227,7 +237,8 @@ fi
 x_io_backend=none
 
 AC_ARG_WITH(select,
-       [  --without-select        disable select IO support (autodetected by default)],
+       AS_HELP_STRING([--without-select],
+                      [disable select IO support (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -245,7 +256,8 @@ AC_ARG_WITH(select,
 )
 
 AC_ARG_WITH(poll,
-       [  --without-poll          disable poll support (autodetected by default)],
+       AS_HELP_STRING([--without-poll],
+                      [disable poll support (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -271,7 +283,8 @@ AC_ARG_WITH(poll,
 )
 
 AC_ARG_WITH(devpoll,
-       [  --without-devpoll       disable /dev/poll IO support (autodetected by default)],
+       AS_HELP_STRING([--without-devpoll],
+                      [disable /dev/poll IO support (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -288,7 +301,8 @@ AC_ARG_WITH(devpoll,
 )
 
 AC_ARG_WITH(epoll,
-       [  --without-epoll         disable epoll IO support (autodetected by default)],
+       AS_HELP_STRING([--without-epoll],
+                      [disable epoll IO support (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -306,7 +320,8 @@ AC_ARG_WITH(epoll,
 )
 
 AC_ARG_WITH(kqueue,
-       [  --without-kqueue        disable kqueue IO support (autodetected by default)],
+       AS_HELP_STRING([--without-kqueue],
+                      [disable kqueue IO support (autodetected by default)]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -346,7 +361,8 @@ fi
 # use SSL?
 
 AC_ARG_WITH(openssl,
-       [  --with-openssl          enable SSL support using OpenSSL],
+       AS_HELP_STRING([--with-openssl],
+                      [enable SSL support using OpenSSL]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -363,7 +379,8 @@ AC_ARG_WITH(openssl,
 )
 
 AC_ARG_WITH(gnutls,
-       [  --with-gnutls           enable SSL support using gnutls],
+       AS_HELP_STRING([--with-gnutls],
+                      [enable SSL support using gnutls]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -393,7 +410,8 @@ fi
 
 x_tcpwrap_on=no
 AC_ARG_WITH(tcp-wrappers,
-       [  --with-tcp-wrappers     enable TCP wrappers support],
+       AS_HELP_STRING([--with-tcp-wrappers],
+                      [enable TCP wrappers support]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -424,7 +442,8 @@ int deny_severity = 0;
 
 x_identauth_on=no
 AC_ARG_WITH(ident,
-       [  --with-ident            enable "IDENT" ("AUTH") protocol support],
+       AS_HELP_STRING([--with-ident],
+                      [enable "IDENT" ("AUTH") protocol support]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -447,7 +466,8 @@ fi
 
 x_pam_on=no
 AC_ARG_WITH(pam,
-       [  --with-pam              enable user authentication using PAM],
+       AS_HELP_STRING([--with-pam],
+                      [enable user authentication using PAM]),
        [       if test "$withval" != "no"; then
                        if test "$withval" != "yes"; then
                                CFLAGS="-I$withval/include $CFLAGS"
@@ -474,7 +494,8 @@ fi
 
 x_ircplus_on=yes
 AC_ARG_ENABLE(ircplus,
-       [  --disable-ircplus       disable IRC+ protocol],
+       AS_HELP_STRING([--disable-ircplus],
+                      [disable IRC+ protocol]),
        if test "$enableval" = "no"; then x_ircplus_on=no; fi
 )
 if test "$x_ircplus_on" = "yes"; then
@@ -484,7 +505,8 @@ fi
 # enable support for IPv6?
 x_ipv6_on=no
 AC_ARG_ENABLE(ipv6,
-       [  --enable-ipv6           enable IPv6 protocol support],
+       AS_HELP_STRING([--enable-ipv6],
+                      [enable IPv6 protocol support]),
        if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
 )
 if test "$x_ipv6_on" = "yes"; then
@@ -500,7 +522,8 @@ fi
 
 x_sniffer_on=no; x_debug_on=no
 AC_ARG_ENABLE(sniffer,
-       [  --enable-sniffer        enable IRC traffic sniffer (enables debug mode)],
+       AS_HELP_STRING([--enable-sniffer],
+                      [enable IRC traffic sniffer (enables debug mode)]),
        if test "$enableval" = "yes"; then
                AC_DEFINE(SNIFFER, 1)
                x_sniffer_on=yes; x_debug_on=yes
@@ -510,7 +533,8 @@ AC_ARG_ENABLE(sniffer,
 # enable additional debugging code?
 
 AC_ARG_ENABLE(debug,
-       [  --enable-debug          show additional debug output],
+       AS_HELP_STRING([--enable-debug],
+                      [show additional debug output]),
        if test "$enableval" = "yes"; then x_debug_on=yes; fi
 )
 if test "$x_debug_on" = "yes"; then
@@ -523,7 +547,8 @@ fi
 
 x_strict_rfc_on=no
 AC_ARG_ENABLE(strict-rfc,
-       [  --enable-strict-rfc     strict RFC conformance -- may break clients!],
+       AS_HELP_STRING([--enable-strict-rfc],
+                      [strict RFC conformance -- may break clients!]),
        if test "$enableval" = "yes"; then
                AC_DEFINE(STRICT_RFC, 1)
                x_strict_rfc_on=yes
@@ -532,9 +557,9 @@ AC_ARG_ENABLE(strict-rfc,
 
 # -- Definitions --
 
-AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
-AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
-AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
+AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
+AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
 
 # Add additional CFLAGS, eventually specified on the command line, but after
 # running this configure script. Useful for "-Werror" for example.
@@ -542,25 +567,27 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
 
 # -- Generate files --
 
-AC_OUTPUT([ \
+AC_CONFIG_FILES([ \
        Makefile \
+       contrib/Anope/Makefile \
+       contrib/Debian/Makefile \
+       contrib/MacOSX/Makefile \
+       contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+       contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
+       contrib/Makefile \
        doc/Makefile \
        doc/src/Makefile \
-       src/Makefile \
-       src/portab/Makefile \
+       man/Makefile \
        src/ipaddr/Makefile \
-       src/tool/Makefile \
+       src/Makefile \
        src/ngircd/Makefile \
+       src/portab/Makefile \
        src/testsuite/Makefile \
-       man/Makefile \
-       contrib/Makefile \
-       contrib/Anope/Makefile \
-       contrib/Debian/Makefile \
-       contrib/MacOSX/Makefile \
-       contrib/MacOSX/ngIRCd.xcodeproj/Makefile \
-       contrib/MacOSX/ngIRCd.pmdoc/Makefile \
+       src/tool/Makefile \
 ])
 
+AC_OUTPUT
+
 type dpkg >/dev/null 2>&1
 if test $? -eq 0; then
        # Generate debian/ link if the dpkg command exists
@@ -582,8 +609,7 @@ C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
 D=`eval echo ${docdir}` ; D=`eval echo ${D}`
 
-echo "             Target: ${target}"
-test "$target" != "$host" && echo "               Host: ${host}"
+echo "               Host: ${host}"
 echo "           Compiler: ${CC}"
 test -n "$CFLAGS"      && echo "     Compiler flags: ${CFLAGS}"
 test -n "$CPPFLAGS"    && echo " Preprocessor flags: ${CPPFLAGS}"
index 3bf68fb4a22991bfde217b124b956d80d4f4907b..00f2530ce32e716fb2d186ea9b5f5a6457d4c724 100644 (file)
@@ -10,7 +10,7 @@
 #
 
 .tmpl:
-       sed \
+       $(AM_V_GEN)sed \
            -e s@:ETCDIR:@${sysconfdir}@ \
            <$< >$@
 
index ebe9fcef41f1c6cbe74b143a924ae3743df9095f..5624e2a1839efa75487975261f36dbb94a7ad98f 100644 (file)
@@ -17,7 +17,7 @@ TEMPLATE_MANS = ngircd.conf.5.tmpl ngircd.8.tmpl
 SUFFIXES = .tmpl .
 
 .tmpl:
-       sed \
+       $(AM_V_GEN)sed \
            -e s@:SBINDIR:@${sbindir}@ \
            -e s@:BINDIR:@${bindir}@ \
            -e s@:ETCDIR:@${sysconfdir}@ \
index fcbb7cfd77f5e2feaf050935f456f4bc964124cd..6ce299f2c9afc0b65edfcafd4b27cfc807b317ed 100644 (file)
@@ -1,4 +1,9 @@
-AUTOMAKE_OPTIONS = ansi2knr
+#
+# ipaddr/Makefile.am
+# (c) 2008 Florian Westphal <fw@strlen.de>, public domain.
+#
+
+AUTOMAKE_OPTIONS = ../portab/ansi2knr
 
 INCLUDES = -I$(srcdir)/../portab
 
index 627e6d3fbf22557d695478ffe2a507b5fafe2a4d..0052de8f91b505a639401253f79f8a6fbc9cf4bd 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "imp.h"
 #include <assert.h>
+#include <ctype.h>
 #include <errno.h>
 #ifdef PROTOTYPES
 #      include <stdarg.h>
@@ -34,9 +35,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#ifdef HAVE_CTYPE_H
-# include <ctype.h>
-#endif
 
 #include "array.h"
 #include "ngircd.h"
@@ -106,6 +104,8 @@ ConfSSL_Init(void)
        free(Conf_SSLOptions.DHFile);
        Conf_SSLOptions.DHFile = NULL;
        array_free_wipe(&Conf_SSLOptions.KeyFilePassword);
+
+       array_free(&Conf_SSLOptions.ListenPorts);
 }
 
 /**
@@ -691,6 +691,7 @@ Set_Defaults(bool InitServers)
                 PACKAGE_NAME, PACKAGE_VERSION);
        free(Conf_ListenAddress);
        Conf_ListenAddress = NULL;
+       array_free(&Conf_ListenPorts);
        array_free(&Conf_Motd);
        strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile));
        strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile));
index 8f7b70afccb0e310793013e0f53ee5f38522a614..914d01651235ad16af2e81ebb3d9a045e1d39a37 100644 (file)
@@ -241,6 +241,9 @@ void ConnSSL_Free(CONNECTION *c)
 bool
 ConnSSL_InitLibrary( void )
 {
+       if (!array_bytes(&Conf_SSLOptions.ListenPorts))
+               return true;
+
 #ifdef HAVE_LIBSSL
        SSL_CTX *newctx;
 
@@ -256,12 +259,14 @@ ConnSSL_InitLibrary( void )
                 * According to OpenSSL RAND_egd(3): "The automatic query of /var/run/egd-pool et al was added in OpenSSL 0.9.7";
                 * so it makes little sense to deal with PRNGD seeding ourselves.
                 */
+               array_free(&Conf_SSLOptions.ListenPorts);
                return false;
        }
 
        newctx = SSL_CTX_new(SSLv23_method());
        if (!newctx) {
                LogOpenSSLError("SSL_CTX_new()", NULL);
+               array_free(&Conf_SSLOptions.ListenPorts);
                return false;
        }
 
@@ -276,6 +281,7 @@ ConnSSL_InitLibrary( void )
        return true;
 out:
        SSL_CTX_free(newctx);
+       array_free(&Conf_SSLOptions.ListenPorts);
        return false;
 #endif
 #ifdef HAVE_LIBGNUTLS
@@ -287,10 +293,13 @@ out:
        err = gnutls_global_init();
        if (err) {
                Log(LOG_ERR, "gnutls_global_init(): %s", gnutls_strerror(err));
+               array_free(&Conf_SSLOptions.ListenPorts);
                return false;
        }
-       if (!ConnSSL_LoadServerKey_gnutls())
+       if (!ConnSSL_LoadServerKey_gnutls()) {
+               array_free(&Conf_SSLOptions.ListenPorts);
                return false;
+       }
        Log(LOG_INFO, "gnutls %s initialized.", gnutls_check_version(NULL));
        initialized = true;
        return true;
@@ -313,7 +322,7 @@ ConnSSL_LoadServerKey_gnutls(void)
 
        cert_file = Conf_SSLOptions.CertFile ? Conf_SSLOptions.CertFile:Conf_SSLOptions.KeyFile;
        if (!cert_file) {
-               Log(LOG_NOTICE, "No SSL server key configured, SSL disabled.");
+               Log(LOG_ERR, "No SSL server key configured!");
                return false;
        }
 
@@ -344,7 +353,7 @@ ConnSSL_LoadServerKey_openssl(SSL_CTX *ctx)
 
        assert(ctx);
        if (!Conf_SSLOptions.KeyFile) {
-               Log(LOG_NOTICE, "No SSL server key configured, SSL disabled.");
+               Log(LOG_ERR, "No SSL server key configured!");
                return false;
        }
 
index 81a0f4507eed0fb79d470bf323452bd1a328dd58..f4511642c7c7b309c0e302de58cd7e184c172166 100644 (file)
 # include <netinet/ip.h>
 #endif
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>                   /* e.g. for Mac OS X */
-#endif
-
 #ifdef TCPWRAP
 # include <tcpd.h>                     /* for TCP Wrappers */
 #endif
@@ -1366,7 +1362,7 @@ Count_Connections(ng_ipaddr_t *a)
  * @returns    Accepted socket descriptor or -1 on error.
  */
 static int
-New_Connection(int Sock, bool IsSSL)
+New_Connection(int Sock, UNUSED bool IsSSL)
 {
 #ifdef TCPWRAP
        struct request_info req;
index 9e1abdd59e8b0349b535b9b1299989f994a3827c..74d8b9d116b3bb71de2388a0c71838f0c86f4e29 100644 (file)
@@ -418,12 +418,15 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
                                                  Client_ID(Client),
                                                  Req->command);
 
-               /* User name: only alphanumeric characters are allowed! */
+               /* User name: only alphanumeric characters and limited
+                  punctuation is allowed.*/
                ptr = Req->argv[0];
                while (*ptr) {
                        if ((*ptr < '0' || *ptr > '9') &&
                            (*ptr < 'A' || *ptr > 'Z') &&
-                           (*ptr < 'a' || *ptr > 'z')) {
+                           (*ptr < 'a' || *ptr > 'z') &&
+                           (*ptr != '+') && (*ptr != '-') &&
+                           (*ptr != '.') && (*ptr != '_')) {
                                Conn_Close(Client_Conn(Client), NULL,
                                           "Invalid user name", true);
                                return DISCONNECTED;
index 460fcd1e4c1954e80d946d6ac1a08a0ba9e7722e..d79344b5941bcfa59ab61ff4a0acd49131fb4b48 100644 (file)
@@ -163,8 +163,8 @@ Login_User_PostAuth(CLIENT *Client)
                return false;
        if (!IRC_WriteStrClient
            (Client, RPL_YOURHOST_MSG, Client_ID(Client),
-            Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU,
-            TARGET_VENDOR, TARGET_OS))
+            Client_ID(Client_ThisServer()), PACKAGE_VERSION, HOST_CPU,
+            HOST_VENDOR, HOST_OS))
                return false;
        if (!IRC_WriteStrClient
            (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr))
index 8a93bcb00839a796b262b890d12b373d662ccf56..a4c2fe8aabc07c72ff5fa00b21330ea087612856 100644 (file)
@@ -330,6 +330,7 @@ main(int argc, const char *argv[])
                Channel_Exit();
                Class_Exit();
                Log_Exit();
+               Signals_Exit();
        }
        Pidfile_Delete();
 
@@ -346,70 +347,99 @@ main(int argc, const char *argv[])
  * line switch.
  */
 static void
-Fill_Version( void )
+Fill_Version(void)
 {
        NGIRCd_VersionAddition[0] = '\0';
 
-#ifdef SYSLOG
-       strlcpy( NGIRCd_VersionAddition, "SYSLOG", sizeof NGIRCd_VersionAddition );
-#endif
-#ifdef ZLIB
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "ZLIB", sizeof NGIRCd_VersionAddition );
+#ifdef DEBUG
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "DEBUG",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef SSL_SUPPORT
-       if ( NGIRCd_VersionAddition[0] ) strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "SSL", sizeof NGIRCd_VersionAddition );
+#ifdef IDENTAUTH
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "IDENT",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef TCPWRAP
-       if( NGIRCd_VersionAddition[0] )
-                       strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "TCPWRAP", sizeof NGIRCd_VersionAddition );
+#ifdef WANT_IPV6
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof(NGIRCd_VersionAddition));
+       strlcat(NGIRCd_VersionAddition, "IPv6",
+               sizeof(NGIRCd_VersionAddition));
 #endif
-#ifdef IDENTAUTH
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "IDENT", sizeof NGIRCd_VersionAddition );
+#ifdef IRCPLUS
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "IRCPLUS",
+               sizeof NGIRCd_VersionAddition);
 #endif
 #ifdef PAM
        if (NGIRCd_VersionAddition[0])
-               strlcat(NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition);
-       strlcat(NGIRCd_VersionAddition, "PAM", sizeof NGIRCd_VersionAddition);
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "PAM",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef DEBUG
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "DEBUG", sizeof NGIRCd_VersionAddition );
+#ifdef STRICT_RFC
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "RFC",
+               sizeof NGIRCd_VersionAddition);
 #endif
 #ifdef SNIFFER
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "SNIFFER", sizeof NGIRCd_VersionAddition );
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "SNIFFER",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef STRICT_RFC
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "RFC", sizeof NGIRCd_VersionAddition );
+#ifdef SSL_SUPPORT
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "SSL",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef IRCPLUS
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "+", sizeof NGIRCd_VersionAddition );
-       strlcat( NGIRCd_VersionAddition, "IRCPLUS", sizeof NGIRCd_VersionAddition );
+#ifdef SYSLOG
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "SYSLOG",
+               sizeof NGIRCd_VersionAddition);
 #endif
-#ifdef WANT_IPV6
+#ifdef TCPWRAP
        if (NGIRCd_VersionAddition[0])
-               strlcat(NGIRCd_VersionAddition, "+", sizeof(NGIRCd_VersionAddition));
-       strlcat(NGIRCd_VersionAddition, "IPv6", sizeof(NGIRCd_VersionAddition));
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "TCPWRAP",
+               sizeof NGIRCd_VersionAddition);
 #endif
-       if( NGIRCd_VersionAddition[0] )
-               strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition ));
-
-       strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition ));
+#ifdef ZLIB
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "+",
+                       sizeof NGIRCd_VersionAddition);
+       strlcat(NGIRCd_VersionAddition, "ZLIB",
+               sizeof NGIRCd_VersionAddition);
+#endif
+       if (NGIRCd_VersionAddition[0])
+               strlcat(NGIRCd_VersionAddition, "-",
+                       sizeof(NGIRCd_VersionAddition));
+
+       strlcat(NGIRCd_VersionAddition, HOST_CPU,
+               sizeof(NGIRCd_VersionAddition));
+       strlcat(NGIRCd_VersionAddition, "/", sizeof(NGIRCd_VersionAddition));
+       strlcat(NGIRCd_VersionAddition, HOST_VENDOR,
+               sizeof(NGIRCd_VersionAddition));
+       strlcat(NGIRCd_VersionAddition, "/", sizeof(NGIRCd_VersionAddition));
+       strlcat(NGIRCd_VersionAddition, HOST_OS,
+               sizeof(NGIRCd_VersionAddition));
 
        snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s",
                 PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition);
@@ -632,7 +662,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
        /* SSL initialization */
        if (!ConnSSL_InitLibrary())
                Log(LOG_WARNING,
-                   "Warning: Error during SSL initialization, continuing ...");
+                   "Error during SSL initialization, continuing without SSL ...");
 
        /* Change root */
        if (Conf_Chroot[0]) {
@@ -715,7 +745,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
                }
 
                /* New child process */
-#ifndef NeXT
+#ifdef HAVE_SETSID
                (void)setsid();
 #else
                setpgrp(0, getpid());
index 66bfef53052322dd9c986d0dee19af9372f12e75..e9c5d53a3f584bc2fda3a13cc5625e63ca37e3c7 100644 (file)
@@ -60,6 +60,7 @@ static COMMAND My_Commands[] =
 {
        { "ADMIN", IRC_ADMIN, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "AWAY", IRC_AWAY, CLIENT_USER, 0, 0, 0 },
+       { "CAP", IRC_CAP, 0xFFFF, 0, 0, 0 },
        { "CONNECT", IRC_CONNECT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 },
        { "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 },
@@ -110,11 +111,12 @@ static COMMAND My_Commands[] =
        { "WHO", IRC_WHO, CLIENT_USER, 0, 0, 0 },
        { "WHOIS", IRC_WHOIS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "WHOWAS", IRC_WHOWAS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
+
 #ifdef IRCPLUS
        { "CHANINFO", IRC_CHANINFO, CLIENT_SERVER, 0, 0, 0 },
 #endif
+
 #ifndef STRICT_RFC
-       { "CAP", IRC_CAP, 0xFFFF, 0, 0, 0 },
        { "GET",  IRC_QUIT_HTTP, CLIENT_UNKNOWN, 0, 0, 0 },
        { "POST", IRC_QUIT_HTTP, CLIENT_UNKNOWN, 0, 0, 0 },
 #endif
index efb41bcd8465147ff68fff0f70afcac1452cdba9..a219105f4b5aff571e045f22d58f0f5fc4d17162 100644 (file)
@@ -334,6 +334,7 @@ Signals_Exit(void)
 #endif
        close(signalpipe[1]);
        close(signalpipe[0]);
+       signalpipe[0] = signalpipe[1] = 0;
 }
 
 /* -eof- */
index 90f36a0ea0e586e3b64f6aeb762f73ba7a5f4098..1c6e3f852aaa02c5b4cbb398803ba9c114ec35b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -120,16 +120,16 @@ typedef unsigned char bool;
 
 /* target constants  */
 
-#ifndef TARGET_OS
-#define TARGET_OS "unknown"
+#ifndef HOST_OS
+#define HOST_OS "unknown"
 #endif
 
-#ifndef TARGET_CPU
-#define TARGET_CPU "unknown"
+#ifndef HOST_CPU
+#define HOST_CPU "unknown"
 #endif
 
-#ifndef TARGET_VENDOR
-#define TARGET_VENDOR "unknown"
+#ifndef HOST_VENDOR
+#define HOST_VENDOR "unknown"
 #endif
 
 
index 5f1e97ad056bbebcd0bea8026961e5de500aace7..8d6cda46656b5d67a6bc8244e6fadd8544b876e9 100644 (file)
@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -8,10 +8,8 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: Makefile.am,v 1.1 2003/01/13 12:20:16 alex Exp $
-#
 
-AUTOMAKE_OPTIONS = ansi2knr
+AUTOMAKE_OPTIONS = ../portab/ansi2knr
 
 INCLUDES = -I$(srcdir)/../portab