ChangeLog | 13 ++++++++ NEWS | 5 +++ autogen.sh | 7 +++- configure.in | 6 +++- contrib/Debian/changelog | 6 +++ contrib/ngircd.spec | 2 +- contrib/platformtest.sh | 22 ++++++------ doc/HowToRelease.txt | 77 ++++++++++++++++++++++++++++++++++++++++++++++ doc/Makefile.am | 6 +-- doc/Platforms.txt | 1 + src/ipaddr/ng_ipaddr.h | 7 +++- src/ngircd/client.c | 3 +- src/ngircd/conf-ssl.h | 3 +- src/ngircd/conf.c | 3 +- src/ngircd/conn.c | 6 ++- src/ngircd/conn.h | 4 ++- src/ngircd/io.c | 51 ++++++++++++++++++++++-------- src/ngircd/irc-info.c | 6 ++- src/ngircd/rendezvous.c | 8 ++-- src/ngircd/resolve.c | 8 ++-- src/portab/portab.h | 6 +-- src/tool/tool.c | 4 +- 22 files changed, 198 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00e8c39..07e77a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,19 @@ ngIRCd Release 17 + ngIRCd 17~rc2 (2010-10-25) + - ZeroConf: include header files missing since commit a988bbc86a. + - Generate ngIRCd version number from GIT tag. + - Make sourcecode compatible with ansi2knr again. This allows to compile + ngIRCd using a pre-ANSI K&R C compiler again. + - ./configure: check if C compiler can compile ISO Standard C. + - ./configure: check support for C prototypes again. + - Don't use PARAMS() macro for function implementations. + - Added m68k/apple/aux3.0.1 (gcc 2.7.2) to doc/Platforms.txt. + - Only try to set FD_CLOEXEC if this flag is defined. + - Only use "__attribute__ ((unused))" if GCC >=2.8 is used. + - doc/Makefile.am: don't set docdir, automake handles it already. + ngIRCd 17~rc1 (2010-10-11) - New configuration option "NoZeroConf" to disable service registration at runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using diff --git a/NEWS b/NEWS index 3b71765..06ba872 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,11 @@ ngIRCd Release 17 + ngIRCd 17~rc2 (2010-10-25) + - Generate ngIRCd version number from GIT tag. + - Make sourcecode compatible with ansi2knr again. This allows to compile + ngIRCd using a pre-ANSI K&R C compiler again. + ngIRCd 17~rc1 (2010-10-11) - New configuration option "NoZeroConf" to disable service registration at runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using diff --git a/autogen.sh b/autogen.sh index bd438cd..c87085a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -150,20 +150,23 @@ echo "Generating files ..." $ACLOCAL && \ $AUTOHEADER && \ $AUTOMAKE --add-missing && \ - $AUTOCONF + $AUTOCONF --force if [ $? -eq 0 -a -x ./configure ]; then # Success: if we got some parameters we call ./configure and pass # all of them to it. + NAME=`grep PACKAGE_STRING= configure | cut -d"'" -f2` if [ "$GO" = "1" ]; then [ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p="" [ -n "$*" ] && a=" $*" || a="" c="./configure${p}${a}" + echo "Okay, autogen.sh for $NAME done." echo "Calling \"$c\" ..." $c exit $? else - echo "Okay, autogen.sh done; now run the \"configure\" script." + echo "Okay, autogen.sh for $NAME done." + echo "Now run the \"./configure\" script." exit 0 fi else diff --git a/configure.in b/configure.in index cd08ef6..1d66a22 100644 --- a/configure.in +++ b/configure.in @@ -9,10 +9,12 @@ # Please read the file COPYING, README and AUTHORS for more information. # +define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \\n)) + # -- Initialisation -- AC_PREREQ(2.50) -AC_INIT(ngircd, 17~rc1) +AC_INIT(ngircd, VERSION_ID) AC_CONFIG_SRCDIR(src/ngircd/ngircd.c) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.6) @@ -43,6 +45,8 @@ AH_TEMPLATE([TARGET_CPU], [Target CPU name]) # -- C Compiler -- AC_PROG_CC +AC_PROG_CC_STDC +AC_C_PROTOTYPES # -- Helper programs -- diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog index d7c2d5a..f81854c 100644 --- a/contrib/Debian/changelog +++ b/contrib/Debian/changelog @@ -1,3 +1,9 @@ +ngircd (17~rc2-0ab1) unstable; urgency=low + + * New "upstream" release candidate 2 for ngIRCd Release 17. + + -- Alexander Barton Mon, 25 Oct 2010 18:51:15 +0200 + ngircd (17~rc1-0ab1) unstable; urgency=low * New "upstream" release candidate 1 for ngIRCd Release 17. diff --git a/contrib/ngircd.spec b/contrib/ngircd.spec index 6b4821a..719eac4 100644 --- a/contrib/ngircd.spec +++ b/contrib/ngircd.spec @@ -1,5 +1,5 @@ %define name ngircd -%define version 17~rc1 +%define version 17~rc2 %define release 1 %define prefix %{_prefix} diff --git a/contrib/platformtest.sh b/contrib/platformtest.sh index 0a518b8..d476595 100755 --- a/contrib/platformtest.sh +++ b/contrib/platformtest.sh @@ -1,7 +1,7 @@ #!/bin/sh # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2009 Alexander Barton +# Copyright (c)2001-2010 Alexander Barton # # 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 @@ -51,9 +51,9 @@ if [ $? -ne 0 ]; then cd .. fi -echo "$NAME: Checking for ./configure script ..." -if [ ! -e ./configure ]; then - echo "$NAME: Not found. Running ./autogen.sh ..." +echo "$NAME: Checking for ./autogen.sh script ..." +if [ -e ./autogen.sh ]; then + echo "$NAME: Running ./autogen.sh ..." [ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null fi @@ -93,7 +93,7 @@ fi # Get compiler information if [ -r "Makefile" ]; then - eval $(grep "^CC = " Makefile | sed -e 's/ //g') + CC=$(grep "^CC = " Makefile | cut -d' ' -f3) $CC --version 2>&1 | grep -i "GCC" >/dev/null if [ $? -eq 0 ]; then COMPILER=$($CC --version | head -n 1 | awk "{ print \$3 }" \ @@ -103,12 +103,12 @@ if [ -r "Makefile" ]; then fi # Get ngIRCd version information -if [ -d ".git" ]; then - VERSION=`git log --abbrev-commit --pretty=oneline HEAD~1.. \ - | head -1 | cut -d' ' -f1 | tr -d '.'` -elif [ -r "Makefile" ]; then - eval $(grep "^VERSION = " Makefile | sed -e 's/ //g') -fi +eval $(grep "^VERSION = " Makefile | sed -e 's/ //g') +case "$VERSION" in + *-*-*) + VERSION=`echo "$VERSION" | cut -d'-' -f3 | cut -b2-` + ;; +esac [ -n "$VERSION" ] || VERSION="unknown" # Get IO interface information diff --git a/doc/HowToRelease.txt b/doc/HowToRelease.txt new file mode 100644 index 0000000..d4d82bc --- /dev/null +++ b/doc/HowToRelease.txt @@ -0,0 +1,77 @@ + + ngIRCd - Next Generation IRC Server + + (c)2001-2010 Alexander Barton, + alex@barton.de, http://www.barton.de/ + + ngIRCd is free software and published under the + terms of the GNU General Public License. + + -- HowToRelease.txt -- + + +I. Introduction +~~~~~~~~~~~~~~~ + +Creating a new ngIRCd release requires a few steps to follow: the source +tree must be in a releasable state (be up to date, include all required +patches, be tested on as many platforms as possible), a name for the new +release must be chosen, and all the files describing the release must be +updated accordingly. + +Since ngIRCd release 13 (2009-12-25) we use "simple" release numbers for +major releases (e.g. "13", "17", "42", ...) introducing new features and +sub-releases for bug fixes only (e.g. "14.1", "22.3", ...). + +When creating pre-releases or release candidates, please use the tilde ("~") +character to separate the "postfix" in the release number (e.g. "17~rc2" +or "123.4~rc6"). + +The release/version number of a build is automatically generated using the +GIT "describe" command, see git-describe(1). Therefore it is required that +a new release is tagged in the GIT tree and that the configure script is +up-to-date (e.g. using ./autogen.sh) before generating the archives! + + +II. How to prepare a new ngIRCd release? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +a) Make sure the source tree is in a releasable state ;-) + +b) Make sure you have working versions of GNU autoconf and GNU automake + installed on the system you use for generating the release: + as of October 2010 we are using GNU autoconf 2.61 and GNU automake 1.10.1 + which seem to work just fine. + +c) Update the files describing the new release: + - ChangeLog + - NEWS + +d) Update the version numbers in the following files: + - contrib/ngircd.spec + +e) Generate a new Debian change log entry in the following file, e.g. using + the Debian "dch" tool of the "devscripts" package: + - contrib/Debian/changelog + +f) Commit the above changes to GIT: "git add", "git commit" + +g) Create a new signed GIT tag for the new release: "git tag -s". + Please note that we don't use the tilde ("~") here, instead use a simple + hyphen ("-") as delimiter: e.g. "rel-16" "rel-17-rc1", "rel-18-pre2", ... + +h) Run "./autogen.sh" to update the ./configure script with the correct + release number (autogenerated using "git describe", see above). + +i) Run "./configure" to rebuild all generated Makefiles. + +j) Run "make distcheck" to generate the distribution archives. + +k) Sign the distribution archive(s) using GnuPG: "gpg -b " + +l) Upload and distribute the newly generated ngIRCd release archive(s) + and GnuPG signatures. + +m) Write an announcement to the mailing list, freshmeat, Twitter, ... + +n) Relax :-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 34dd9c9..1e5773e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2008 Alexander Barton (alex@barton.de) +# Copyright (c)2001-2010 Alexander Barton (alex@barton.de) # # Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen # der GNU General Public License (GPL), wie von der Free Software Foundation @@ -14,13 +14,11 @@ SUBDIRS = src EXTRA_DIST = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \ README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \ - sample-ngircd.conf + HowToRelease.txt sample-ngircd.conf maintainer-clean-local: rm -f Makefile Makefile.in -docdir ?= $(datadir)/doc/$(PACKAGE) - documents = $(EXTRA_DIST) ../AUTHORS ../COPYING ../ChangeLog ../INSTALL \ ../NEWS ../README diff --git a/doc/Platforms.txt b/doc/Platforms.txt index ce06e27..32cb8c1 100644 --- a/doc/Platforms.txt +++ b/doc/Platforms.txt @@ -57,6 +57,7 @@ i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y (1) i686/pc/linux-gnu gcc 3.3.5 14.1 09-08-04 alex Y Y Y Y (1) i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y (1) i686/pc/linux-gnu gcc 4.3.2 14.1 09-08-04 alex Y Y Y Y (1) +m68k/apple/aux3.0.1 gcc 2.7.2 17~rc1 10-10-12 alex Y Y Y Y m68k/apple/aux3.1.1 Orig. A/UX 0.7.x-CVS 03-04-22 alex Y Y Y Y (2) m68k/hp/hp-ux9.10 Orig. HPUX 0.7.x-CVS 03-04-30 goetz Y Y Y Y m88k/dg/dgux5.4R3.10 gcc 2.5.8 CVSHEAD 04-03-15 alex Y Y ? ? diff --git a/src/ipaddr/ng_ipaddr.h b/src/ipaddr/ng_ipaddr.h index 4582e2a..54a9703 100644 --- a/src/ipaddr/ng_ipaddr.h +++ b/src/ipaddr/ng_ipaddr.h @@ -103,8 +103,11 @@ GLOBAL const char *ng_ipaddr_tostr PARAMS((const ng_ipaddr_t *addr)); /* convert struct sockaddr to string. dest must be NG_INET_ADDRSTRLEN bytes long */ GLOBAL bool ng_ipaddr_tostr_r PARAMS((const ng_ipaddr_t *addr, char *dest)); #else -static inline const char * -ng_ipaddr_tostr(const ng_ipaddr_t *addr) { return inet_ntoa(addr->sin4.sin_addr); } +static inline const char* +ng_ipaddr_tostr(const ng_ipaddr_t *addr) +{ + return inet_ntoa(addr->sin4.sin_addr); +} static inline bool ng_ipaddr_tostr_r(const ng_ipaddr_t *addr, char *d) diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 0334783..739c5ea 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -363,7 +363,8 @@ Client_SetUser( CLIENT *Client, const char *User, bool Idented ) * @param User User name to set. */ GLOBAL void -Client_SetOrigUser(CLIENT UNUSED *Client, const char UNUSED *User) { +Client_SetOrigUser(CLIENT UNUSED *Client, const char UNUSED *User) +{ assert(Client != NULL); assert(User != NULL); diff --git a/src/ngircd/conf-ssl.h b/src/ngircd/conf-ssl.h index e88d3e8..cdb9968 100644 --- a/src/ngircd/conf-ssl.h +++ b/src/ngircd/conf-ssl.h @@ -39,7 +39,8 @@ bool ConnSSL_InitLibrary(void); #else static inline bool -ConnSSL_InitLibrary(void) { return true; } +ConnSSL_InitLibrary(void) +{ return true; } #endif /* SSL_SUPPORT */ #endif /* conf_ssl_h */ diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index f8b470f..4804f2b 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -844,7 +844,8 @@ Check_ArgIsTrue( const char *Arg ) } /* Check_ArgIsTrue */ -static unsigned int Handle_MaxNickLength(int Line, const char *Arg) +static unsigned int +Handle_MaxNickLength(int Line, const char *Arg) { unsigned new; diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index d74f251..bbb186e 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -681,9 +681,11 @@ SSL_WantWrite(const CONNECTION *c) } #else static inline bool -SSL_WantRead(UNUSED const CONNECTION *c) { return false; } +SSL_WantRead(UNUSED const CONNECTION *c) +{ return false; } static inline bool -SSL_WantWrite(UNUSED const CONNECTION *c) { return false; } +SSL_WantWrite(UNUSED const CONNECTION *c) +{ return false; } #endif diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h index 1e938ad..280c61b 100644 --- a/src/ngircd/conn.h +++ b/src/ngircd/conn.h @@ -122,7 +122,9 @@ GLOBAL PROC_STAT* Conn_GetProcStat PARAMS((CONN_ID i)); GLOBAL bool Conn_GetCipherInfo PARAMS((CONN_ID Idx, char *buf, size_t len)); GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx)); #else -static inline bool Conn_UsesSSL(UNUSED CONN_ID Idx) { return false; } +static inline bool +Conn_UsesSSL(UNUSED CONN_ID Idx) +{ return false; } #endif GLOBAL long Conn_Count PARAMS((void)); diff --git a/src/ngircd/io.c b/src/ngircd/io.c index 6843899..d13a5e2 100644 --- a/src/ngircd/io.c +++ b/src/ngircd/io.c @@ -115,7 +115,7 @@ static fd_set writers; * the largest fd registered, plus one. */ static int select_maxfd; -static int io_dispatch_select(struct timeval *tv); +static int io_dispatch_select PARAMS((struct timeval *tv)); #ifndef IO_USE_EPOLL #define io_masterfd -1 @@ -127,12 +127,15 @@ static array io_events; static void io_docallback PARAMS((int fd, short what)); #ifdef DEBUG_IO -static void io_debug(const char *s, int fd, int what) +static void +io_debug(const char *s, int fd, int what) { Log(LOG_DEBUG, "%s: %d, %d\n", s, fd, what); } #else -static inline void io_debug(const char UNUSED *s,int UNUSED a, int UNUSED b) {/*NOTHING*/} +static inline void +io_debug(const char UNUSED *s,int UNUSED a, int UNUSED b) +{ /* NOTHING */ } #endif static io_event * @@ -227,8 +230,12 @@ io_library_init_devpoll(unsigned int eventsize) eventsize, io_masterfd); } #else -static inline void io_close_devpoll(int UNUSED x) {/* NOTHING */} -static inline void io_library_init_devpoll(unsigned int UNUSED ev) {/*NOTHING*/} +static inline void +io_close_devpoll(int UNUSED x) +{ /* NOTHING */ } +static inline void +io_library_init_devpoll(unsigned int UNUSED ev) +{ /* NOTHING */ } #endif @@ -331,8 +338,12 @@ io_library_init_poll(unsigned int eventsize) } } #else -static inline void io_close_poll(int UNUSED x) {/* NOTHING */} -static inline void io_library_init_poll(unsigned int UNUSED ev) {/*NOTHING*/} +static inline void +io_close_poll(int UNUSED x) +{ /* NOTHING */ } +static inline void +io_library_init_poll(unsigned int UNUSED ev) +{ /* NOTHING */ } #endif @@ -340,11 +351,15 @@ static inline void io_library_init_poll(unsigned int UNUSED ev) {/*NOTHING*/} static int io_dispatch_select(struct timeval *tv) { - fd_set readers_tmp = readers; - fd_set writers_tmp = writers; + fd_set readers_tmp; + fd_set writers_tmp; short what; int ret, i; int fds_ready; + + readers_tmp = readers; + writers_tmp = writers; + ret = select(select_maxfd + 1, &readers_tmp, &writers_tmp, NULL, tv); if (ret <= 0) return ret; @@ -418,8 +433,12 @@ io_close_select(int fd) } } #else -static inline void io_library_init_select(int UNUSED x) {/* NOTHING */} -static inline void io_close_select(int UNUSED x) {/* NOTHING */} +static inline void +io_library_init_select(int UNUSED x) +{ /* NOTHING */ } +static inline void +io_close_select(int UNUSED x) +{ /* NOTHING */ } #endif /* SELECT */ @@ -494,7 +513,9 @@ io_library_init_epoll(unsigned int eventsize) #endif } #else -static inline void io_library_init_epoll(unsigned int UNUSED ev) {/* NOTHING */} +static inline void +io_library_init_epoll(unsigned int UNUSED ev) +{ /* NOTHING */ } #endif /* IO_USE_EPOLL */ @@ -620,7 +641,9 @@ io_library_init_kqueue(unsigned int eventsize) library_initialized = true; } #else -static inline void io_library_init_kqueue(unsigned int UNUSED ev) {/* NOTHING */} +static inline void +io_library_init_kqueue(unsigned int UNUSED ev) +{ /* NOTHING */ } #endif @@ -791,7 +814,9 @@ io_setcloexec(int fd) int flags = fcntl(fd, F_GETFD); if (flags == -1) return false; +#ifdef FD_CLOEXEC flags |= FD_CLOEXEC; +#endif return fcntl(fd, F_SETFD, flags) == 0; } diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 905799e..638a8e9 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -1239,7 +1239,9 @@ static bool Show_MOTD_SSLInfo(CLIENT *Client) return ret; } #else -static inline bool Show_MOTD_SSLInfo(UNUSED CLIENT *c) { return true; } +static inline bool +Show_MOTD_SSLInfo(UNUSED CLIENT *c) +{ return true; } #endif GLOBAL bool @@ -1337,7 +1339,7 @@ IRC_Send_NAMES( CLIENT *Client, CHANNEL *Chan ) * See for details. */ GLOBAL bool -IRC_Send_ISUPPORT PARAMS((CLIENT * Client)) +IRC_Send_ISUPPORT(CLIENT * Client) { if (!IRC_WriteStrClient(Client, RPL_ISUPPORT1_MSG, Client_ID(Client), Conf_MaxJoins)) diff --git a/src/ngircd/rendezvous.c b/src/ngircd/rendezvous.c index 2d9ae69..c0c22eb 100644 --- a/src/ngircd/rendezvous.c +++ b/src/ngircd/rendezvous.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2004 by Alexander Barton (alex@barton.de) + * Copyright (c)2001-2010 by Alexander Barton (alex@barton.de) * * 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 @@ -21,8 +21,6 @@ #ifdef ZEROCONF -static char UNUSED id[] = "$Id: rendezvous.c,v 1.8 2006/05/10 21:24:01 alex Exp $"; - #include "imp.h" #include @@ -43,6 +41,8 @@ static char UNUSED id[] = "$Id: rendezvous.c,v 1.8 2006/05/10 21:24:01 alex Exp #endif #include "defines.h" +#include "conn.h" +#include "conf.h" #include "log.h" #include "exp.h" @@ -152,7 +152,7 @@ GLOBAL bool Rendezvous_Register( char *Name, char *Type, UINT16 Port ) int i; if (Conf_NoZeroConf) - return; + return true; /* Search free port structure */ for( i = 0; i < MAX_RENDEZVOUS; i++ ) if( ! My_Rendezvous[i].Desc[0] ) break; diff --git a/src/ngircd/resolve.c b/src/ngircd/resolve.c index 9bc3a87..5839c19 100644 --- a/src/ngircd/resolve.c +++ b/src/ngircd/resolve.c @@ -344,15 +344,15 @@ Addr_in_list(const array *resolved_addr, const ng_ipaddr_t *Addr) static void Log_Forgery_NoIP(const char *ip, const char *host) { - Log_Subprocess(LOG_WARNING, "Possible forgery: %s resolved to %s " - "(which has no ip address)", ip, host); + Log_Subprocess(LOG_WARNING, + "Possible forgery: %s resolved to %s (which has no ip address)", ip, host); } static void Log_Forgery_WrongIP(const char *ip, const char *host) { - Log_Subprocess(LOG_WARNING,"Possible forgery: %s resolved to %s " - "(which points to different address)", ip, host); + Log_Subprocess(LOG_WARNING, + "Possible forgery: %s resolved to %s (which points to different address)", ip, host); } diff --git a/src/portab/portab.h b/src/portab/portab.h index 56d4249..d2f769f 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2005 Alexander Barton (alex@barton.de) + * Copyright (c)2001-2010 Alexander Barton (alex@barton.de) * * 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,8 +8,6 @@ * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: portab.h,v 1.22 2005/07/31 20:13:11 alex Exp $ - * * Portability functions and declarations (header for libngbportab). */ @@ -48,7 +46,7 @@ /* compiler features */ -#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)) # define PUNUSED(x) __attribute__ ((unused)) x # define UNUSED __attribute__ ((unused)) #else diff --git a/src/tool/tool.c b/src/tool/tool.c index 9e29074..dbdb49a 100644 --- a/src/tool/tool.c +++ b/src/tool/tool.c @@ -186,8 +186,8 @@ CODE facilitynames[] = { #endif -GLOBAL const char -*ngt_SyslogFacilityName(int Facility) +GLOBAL const char* +ngt_SyslogFacilityName(int Facility) { int i = 0; while(facilitynames[i].c_name) {