From 4dd1c31dc70e97015f6bff4344de30742db073e8 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:36:34 +0200 Subject: Don't check type.h availability, it is required --- src/ngircd/conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index 627e6d3f..5853926e 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -18,6 +18,7 @@ #include "imp.h" #include +#include #include #ifdef PROTOTYPES # include @@ -34,9 +35,6 @@ #include #include -#ifdef HAVE_CTYPE_H -# include -#endif #include "array.h" #include "ngircd.h" -- cgit 1.4.1 From 74c7d7131f6754e1afa9b1ec7b95e95824475c97 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:37:31 +0200 Subject: Don't include , it is included by "portab.h" --- src/ngircd/conn.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 6091ebe2..f4511642 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -47,10 +47,6 @@ # include #endif -#ifdef HAVE_STDINT_H -# include /* e.g. for Mac OS X */ -#endif - #ifdef TCPWRAP # include /* for TCP Wrappers */ #endif -- cgit 1.4.1 From b2482b39e40bd5355cb6ea935d7dc1f1bd18f7ab Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:38:19 +0200 Subject: Use HAVE_SETSID #define when testing for setsid() --- src/ngircd/ngircd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 8a93bcb0..67bc4df4 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -715,7 +715,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) } /* New child process */ -#ifndef NeXT +#ifdef HAVE_SETSID (void)setsid(); #else setpgrp(0, getpid()); -- cgit 1.4.1 From 82bf4eb0591631e638120e0540fbbb7ceb4e19a9 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 13 Sep 2012 00:06:08 +0200 Subject: configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET) See the autoconf manual for details: http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets --- configure.in | 19 +++++++++---------- src/ngircd/login.c | 4 ++-- src/ngircd/ngircd.c | 6 +++--- src/portab/portab.h | 14 +++++++------- 4 files changed, 21 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/configure.in b/configure.in index b65d1558..0f6af2a0 100644 --- a/configure.in +++ b/configure.in @@ -19,7 +19,7 @@ AC_INIT([ngIRCd], VERSION_ID, AC_CONFIG_SRCDIR([src/ngircd/ngircd.c]) AC_CONFIG_HEADER([src/config.h]) -AC_CANONICAL_TARGET +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([1.11]) @@ -40,9 +40,9 @@ AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used]) AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled]) 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 -- @@ -87,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) @@ -538,9 +538,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. @@ -590,8 +590,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}" diff --git a/src/ngircd/login.c b/src/ngircd/login.c index 460fcd1e..d79344b5 100644 --- a/src/ngircd/login.c +++ b/src/ngircd/login.c @@ -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)) diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 67bc4df4..44c4ca79 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -405,11 +405,11 @@ Fill_Version( void ) if( NGIRCd_VersionAddition[0] ) strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition )); + strlcat( NGIRCd_VersionAddition, HOST_CPU, sizeof( NGIRCd_VersionAddition )); strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition )); + strlcat( NGIRCd_VersionAddition, HOST_VENDOR, sizeof( NGIRCd_VersionAddition )); strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_OS, 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); diff --git a/src/portab/portab.h b/src/portab/portab.h index 90f36a0e..1c6e3f85 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -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 -- cgit 1.4.1 From 5c160921ff898653666e72eb2e6c33575ada9672 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 16 Sep 2012 12:43:12 +0200 Subject: AUTOMAKE_OPTIONS: fix ansi2knr option, include path Set correct relative path to ansi2knr.c in AUTOMAKE_OPTIONS, so that ansi2knr.{1|c} is only included once in the distribution archive. --- src/ipaddr/Makefile.am | 7 ++++++- src/tool/Makefile.am | 6 ++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ipaddr/Makefile.am b/src/ipaddr/Makefile.am index fcbb7cfd..6ce299f2 100644 --- a/src/ipaddr/Makefile.am +++ b/src/ipaddr/Makefile.am @@ -1,4 +1,9 @@ -AUTOMAKE_OPTIONS = ansi2knr +# +# ipaddr/Makefile.am +# (c) 2008 Florian Westphal , public domain. +# + +AUTOMAKE_OPTIONS = ../portab/ansi2knr INCLUDES = -I$(srcdir)/../portab diff --git a/src/tool/Makefile.am b/src/tool/Makefile.am index 5f1e97ad..8d6cda46 100644 --- a/src/tool/Makefile.am +++ b/src/tool/Makefile.am @@ -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 -- cgit 1.4.1