Merge branch 'staging/elemental-6.6'

This commit is contained in:
Sam Dodrill 2014-08-01 18:24:31 -07:00
commit 4810e6a8d4
25 changed files with 2579 additions and 1204 deletions

15
CREDITS
View File

@ -1,14 +1,23 @@
$Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $ $Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $
elemental-ircd is a fork of the ShadowIRCD project created to meet Elemental-IRCd is a fork of the now-defunct ShadowIRCD project.
The Elemental-IRCd team is listed below in nick-alphabetical order:
Xena, Sam Dodrill <shadowh511 -at- gmail.com>
Some Elemental-IRCd features are modeled after or direct ports of
code from Charybdis.
ponychat-ircd is a fork of the ShadowIRCD project created to meet
PonyChat's needs and keep the now-defunct ShadowIRCD project's goals PonyChat's needs and keep the now-defunct ShadowIRCD project's goals
alive. alive.
The elemental-ircd team is listed in nick-alphabetical order: The ponychat-ircd team is listed in nick-alphabetical order:
aji, Alex Iadicico <alex -at- ajitek.net> aji, Alex Iadicico <alex -at- ajitek.net>
lyska, Sam Dodrill <shadowh511 -at- gmail.com>>
Kabaka, Kyle Johnson <kabaka -at- ponychat.net> Kabaka, Kyle Johnson <kabaka -at- ponychat.net>
Xe, Sam Dodrill <shadowh511 -at- gmail.com>
ShadowIRCd 6 is a modern restart of the old ShadowIRCd project ShadowIRCd 6 is a modern restart of the old ShadowIRCd project
based on Charybdis with a few additional features to make it appeal based on Charybdis with a few additional features to make it appeal

107
Config
View File

@ -8,21 +8,10 @@ This software is under GPL.
from os import system from os import system
def promptUser(prompt, default): try:
inp = raw_input("%s [%s]> " % (prompt, default)) raw_input = raw_input
except NameError:
if inp == "": raw_input = input
return default
else:
return inp
def promptYesNo(prompt, default=True):
inp = False if promptUser(prompt, "Y") == "N" else True
return inp
configflags = ["./configure"]
system("clear")
art = """ art = """
_______ __ __ __ _______ ______ ______ __ _______ __ __ __ _______ ______ ______ __
@ -35,49 +24,62 @@ Welcome to the Elemental-IRCd Configuration script. This script will help you ch
best compile flags for your installation of Elemental-IRCd. best compile flags for your installation of Elemental-IRCd.
""" """
print(art) class Configure():
print(welcome) def promptUser(self, prompt, default):
inp = raw_input("%s [%s]> " % (prompt, default))
if inp == "":
return default
return inp
print("Please specify where you would like to install Elemental-IRCd.") def promptYesNo(self, prompt, defult=True):
installloc = promptUser("Install location?", "$HOME/ircd") inp = False if self.promptUser(prompt, "Y") == "N" else True
return inp
print("") def go(self):
configflags = ["./configure"]
print(art)
print(welcome)
print("Please specify the maximum nickname length. This must be the same across") print("Please specify where you would like to install Elemental-IRCd.")
print("all servers in your network or you risk desyncs. The maximum is 50.") installloc = self.promptUser("Install location?", "$HOME/ircd")
nicklen = 100 print("")
while nicklen > 51: print("Please specify the maximum nickname length. This must be the same across")
if nicklen != 100: print("all servers in your network or you risk desyncs. The maximum is 50.")
print "Error: you must choose a value under 50."
nicklen = int(promptUser("Maximum nickname length?", "31")) nicklen = 0
nicklen_valid = False
while not nicklen_valid:
try:
nicklen = int(self.promptUser("Maximum nickname length?", "31"))
if nicklen < 51:
nicklen_valid = True
except ValueError:
nicklen_valid = False
print("") if not nicklen_valid:
print("Error: you must choose an integer value under 50.")
print("Would you like to disable small network support? This increases the size") print("")
print("of a few buffers in the code and can increase performance on large networks.")
smallnet = promptYesNo("Small network? (Y/N)") print("Would you like to disable small network support? This increases the size")
print("of a few buffers in the code and can increase performance on large networks.")
smallnet = self.promptYesNo("Small network? (Y/N)")
configflags.append("--prefix=%s" % installloc) configflags.append("--prefix=%s" % installloc)
configflags.append("--with-nicklen=%s" % nicklen) configflags.append("--with-nicklen=%s" % nicklen)
if not smallnet:
configflags.append("--enable-small-net")
else:
configflags.append("--disable-small-net")
if not smallnet: print("\nThat should be it for now. Running %s" % " ".join(configflags))
configflags.append("--enable-small-net") raw_input("Press enter to continue... ")
else: system(" ".join(configflags))
configflags.append("--disable-small-net") print(art)
print("\nThat should be it for now. Running %s" % " ".join(configflags)) print("""
Next, run `make` and `make install`. Then copy %s/etc/example.conf to
raw_input("Press enter to continue... ")
system(" ".join(configflags))
print(art)
print("""
Next, run make and make install. Then copy %s/etc/example.conf to
%s/etc/ircd.conf and read through the example configuration completely to make %s/etc/ircd.conf and read through the example configuration completely to make
sure your install is tailored to your needs. After that, run %s/bin/ircd sure your install is tailored to your needs. After that, run %s/bin/ircd
and start to connect clients and servers as you need. and start to connect clients and servers as you need.
@ -85,8 +87,13 @@ and start to connect clients and servers as you need.
If you have any problems, please check the documentation in the doc/ folder If you have any problems, please check the documentation in the doc/ folder
of the source repository. If problems persist please stop by #elemental-ircd of the source repository. If problems persist please stop by #elemental-ircd
on irc.yolo-swag.com and ask. Running Elemental-IRCd in insane conditions may on irc.yolo-swag.com and ask. Running Elemental-IRCd in insane conditions may
make support either very difficult or at most impossible.""" %\ make support either very difficult or at most impossible.""" % (installloc, installloc, installloc))
(installloc, installloc, installloc))
system("clear")
c = Configure()
try:
c.go()
except (KeyboardInterrupt, EOFError):
print("\nInterrupted, exiting!")
# vim: set ts=4 sw=4 tw=0 et # vim: set ts=4 sw=4 tw=0 et

33
NEWS
View File

@ -1,6 +1,39 @@
This is elemental-ircd 6.5, Copyright (c) 2013 elemental-ircd team. This is elemental-ircd 6.5, Copyright (c) 2013 elemental-ircd team.
See LICENSE for licensing details (GPL v2). See LICENSE for licensing details (GPL v2).
-- elemental-ircd 6.6
additions
- add OWNER=y to 005
- add autoconfigure script like unrealircd
- add channel mode +u to hide banlists unless users have halfop or up
- add modules for services packages
- add quotes around PART reason
- add umode +I to hide channels line from WHOIS
- make end-user /OPER failures much more generic
- make flooding SNOTEs global
- show own modes in whois
- show remote server IP addresses
- update helpfiles to have much more up to date information
bugfixes
- don't strip unicode in strip_unprintable
- fix extended-join for remote users
- fix null reference in away-notify
- make genssl.sh generate ten year certs
removals
- remove away-notify
- remove AHBL from default configs
- remove m_post SNOTEs because of an upstream change
The official channel for Elemental-IRCd is now #elemental-ircd on
irc.yolo-swag.com.
-- elemental-ircd 6.5.1
Rename to Elemental-IRCd
-- ponychat-ircd 6.5 -- ponychat-ircd 6.5
additions additions

View File

@ -1,22 +1,6 @@
# TODO # TODO
## elemental-ircd 6.5.2 ## elemental-ircd 6.7
- [ ] Fix `extended-join` not triggering for users on other servers
- [x] Patch `m_sasl`, http://seclists.org/fulldisclosure/2014/Mar/320
- [x] Fix null reference in `src/channel.c`
- [x] Add basic autoconfiguration script
- [x] Add modules for services packages
- [x] Make end user oper failures more generic
- [x] Add `OWNER=` to `005`
- [x] Show own modes in a `WHOIS`
- [x] Remove AHBL blacklists from default configs
- [x] Remove `SNOTE`s in `m_post`
- [x] Make flooding `SNOTE`s global
- [x] Add quotes around `PART` reason
- [x] Disable `away-notify` for now
## elemental-ircd 6.6
- [ ] Finish websocket support - [ ] Finish websocket support
- [x] Configuration for websocket ports - [x] Configuration for websocket ports

18
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for elemental-ircd 6.5.1. # Generated by GNU Autoconf 2.69 for elemental-ircd 6.6.
# #
# 2014 elemental-ircd Team # 2014 elemental-ircd Team
# #
@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='elemental-ircd' PACKAGE_NAME='elemental-ircd'
PACKAGE_TARNAME='elemental-ircd' PACKAGE_TARNAME='elemental-ircd'
PACKAGE_VERSION='6.5.1' PACKAGE_VERSION='6.6'
PACKAGE_STRING='elemental-ircd 6.5.1' PACKAGE_STRING='elemental-ircd 6.6'
PACKAGE_BUGREPORT='' PACKAGE_BUGREPORT=''
PACKAGE_URL='' PACKAGE_URL=''
@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures elemental-ircd 6.5.1 to adapt to many kinds of systems. \`configure' configures elemental-ircd 6.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1364,7 +1364,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of elemental-ircd 6.5.1:";; short | recursive ) echo "Configuration of elemental-ircd 6.6:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1488,7 +1488,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
elemental-ircd configure 6.5.1 elemental-ircd configure 6.6
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -2092,7 +2092,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by elemental-ircd $as_me 6.5.1, which was It was created by elemental-ircd $as_me 6.6, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -10100,7 +10100,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by elemental-ircd $as_me 6.5.1, which was This file was extended by elemental-ircd $as_me 6.6, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -10166,7 +10166,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
elemental-ircd config.status 6.5.1 elemental-ircd config.status 6.6
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@ -10,7 +10,7 @@ AC_PREREQ(2.57)
dnl Sneaky way to get an Id tag into the configure script dnl Sneaky way to get an Id tag into the configure script
AC_COPYRIGHT([2014 elemental-ircd Team]) AC_COPYRIGHT([2014 elemental-ircd Team])
AC_INIT([elemental-ircd],[6.5.1]) AC_INIT([elemental-ircd],[6.6])
AC_CONFIG_HEADER(include/setup.h) AC_CONFIG_HEADER(include/setup.h)

View File

@ -3,6 +3,7 @@
* Copyright (C) 2000-2002 Hybrid Development Team * Copyright (C) 2000-2002 Hybrid Development Team
* Copyright (C) 2002-2005 ircd-ratbox development team * Copyright (C) 2002-2005 ircd-ratbox development team
* Copyright (C) 2005-2006 charybdis development team * Copyright (C) 2005-2006 charybdis development team
* Copyright (C) 2014 Elemental-IRCd development team
* *
* $Id: example.conf 3582 2007-11-17 21:55:48Z jilles $ * $Id: example.conf 3582 2007-11-17 21:55:48Z jilles $
* *
@ -47,10 +48,10 @@ loadmodule "extensions/sno_globaloper.so";
#loadmodule "extensions/sno_whois.so"; #loadmodule "extensions/sno_whois.so";
serverinfo { serverinfo {
name = "hades.arpa"; name = "hostname.domain.tld";
sid = "42X"; sid = "42X";
description = "shadowircd test server"; description = "elemental-ircd test server";
network_name = "AthemeNET"; network_name = "ShadowNET";
network_desc = "Your IRC network."; network_desc = "Your IRC network.";
helpchan = "#help"; helpchan = "#help";
helpurl = "http://www.mynet.net/help"; helpurl = "http://www.mynet.net/help";
@ -90,7 +91,7 @@ serverinfo {
admin { admin {
name = "Lazy admin (lazya)"; name = "Lazy admin (lazya)";
description = "AthemeNET client server"; description = "ShadowNET client server";
email = "nobody@127.0.0.1"; email = "nobody@127.0.0.1";
}; };
@ -139,7 +140,8 @@ listen {
/* defer_accept: wait for clients to send IRC handshake data before /* defer_accept: wait for clients to send IRC handshake data before
* accepting them. if you intend to use software which depends on the * accepting them. if you intend to use software which depends on the
* server replying first, such as BOPM, you should disable this feature. * server replying first, such as BOPM, you should disable this feature.
* otherwise, you probably want to leave it on. * otherwise, you probably want to leave it on. Disabling this will not
* update on a rehash.
*/ */
defer_accept = yes; defer_accept = yes;
@ -152,8 +154,8 @@ listen {
/* Listen on IPv6 (if you used host= above). */ /* Listen on IPv6 (if you used host= above). */
#host = "3ffe:1234:a:b:c::d"; #host = "3ffe:1234:a:b:c::d";
#port = 5000, 6665 .. 6669; #port = 5000, 6665 .. 6669;
#sslport = 9999; #sslport = 9999;
}; };
/* auth {}: allow users to connect to the ircd (OLD I:) /* auth {}: allow users to connect to the ircd (OLD I:)
@ -210,8 +212,8 @@ auth {
* jupe_exempt | exempt this user from generating * jupe_exempt | exempt this user from generating
* warnings joining juped channels * warnings joining juped channels
* resv_exempt | exempt this user from resvs * resv_exempt | exempt this user from resvs
* flood_exempt | exempt this user from flood limits * flood_exempt | exempt this user from flood limits
* USE WITH CAUTION. * USE WITH CAUTION.
* no_tilde (old - flag) | don't prefix ~ to username if no ident * no_tilde (old - flag) | don't prefix ~ to username if no ident
* need_ident (old + flag) | require ident for user in this class * need_ident (old + flag) | require ident for user in this class
* need_ssl | require SSL/TLS for user in this class * need_ssl | require SSL/TLS for user in this class
@ -392,14 +394,14 @@ channel {
exemptchanops = "NT"; exemptchanops = "NT";
use_halfop = yes; use_halfop = yes;
use_admin = yes; use_admin = yes;
use_owner = yes; use_owner = yes;
use_knock = yes; use_knock = yes;
use_local_channels = yes; use_local_channels = yes;
knock_delay = 5 minutes; knock_delay = 5 minutes;
knock_delay_channel = 1 minute; knock_delay_channel = 1 minute;
max_chans_per_user = 15; max_chans_per_user = 15;
max_bans = 100; max_bans = 100;
max_bans_large = 500; max_bans_large = 500;
default_split_user_count = 0; default_split_user_count = 0;
default_split_server_count = 0; default_split_server_count = 0;
no_create_on_split = no; no_create_on_split = no;
@ -425,7 +427,7 @@ serverhide {
* They are used in pairs of one host/rejection reason. * They are used in pairs of one host/rejection reason.
* *
* These settings should be adequate for most networks, and are (presently) * These settings should be adequate for most networks, and are (presently)
* required for use on AthemeNet. * required for use on ShadowNet.
* *
* Word to the wise: Do not use blacklists like SPEWS for blocking IRC * Word to the wise: Do not use blacklists like SPEWS for blocking IRC
* connections. * connections.
@ -529,23 +531,23 @@ general {
default_operstring = "is an IRC Operator"; default_operstring = "is an IRC Operator";
default_adminstring = "is a Server Administrator"; default_adminstring = "is a Server Administrator";
default_operhost = "staff.testnet.net"; #default_operhost = "staff.testnet.net";
#static_quit = "I like turtles!"; #static_quit = "I like turtles!";
servicestring = "is a Network Service"; servicestring = "is a Network Service";
disable_fake_channels = no; disable_fake_channels = no;
hide_channel_below_users = 3; hide_channel_below_users = 3;
tkline_expire_notices = no; tkline_expire_notices = no;
default_floodcount = 10; default_floodcount = 10;
failed_oper_notice = yes; failed_oper_notice = yes;
dots_in_ident=2; dots_in_ident=2;
min_nonwildcard = 4; min_nonwildcard = 4;
min_nonwildcard_simple = 3; min_nonwildcard_simple = 3;
max_accept = 100; max_accept = 100;
max_monitor = 100; max_monitor = 100;
anti_nick_flood = yes; anti_nick_flood = yes;
max_nick_time = 20 seconds; max_nick_time = 20 seconds;
max_nick_changes = 5; max_nick_changes = 5;
anti_spam_exit_message_time = 5 minutes; anti_spam_exit_message_time = 5 minutes;
use_part_messages = yes; use_part_messages = yes;
ts_warn_delta = 30 seconds; ts_warn_delta = 30 seconds;
ts_max_delta = 5 minutes; ts_max_delta = 5 minutes;
@ -569,7 +571,7 @@ general {
stats_P_oper_only=no; stats_P_oper_only=no;
stats_i_oper_only=masked; stats_i_oper_only=masked;
stats_k_oper_only=masked; stats_k_oper_only=masked;
map_oper_only = no; map_oper_only = no;
operspy_admin_only = no; operspy_admin_only = no;
operspy_dont_care_user_info = no; operspy_dont_care_user_info = no;
secret_channels_in_whois = no; secret_channels_in_whois = no;
@ -585,11 +587,11 @@ general {
true_no_oper_flood = no; true_no_oper_flood = no;
max_targets = 4; max_targets = 4;
client_flood = 20; client_flood = 20;
use_whois_actually = no; use_whois_actually = no;
oper_only_umodes = operwall, locops, servnotice; oper_only_umodes = operwall, locops, servnotice;
oper_umodes = locops, servnotice, operwall, wallop; oper_umodes = locops, servnotice, operwall, wallop;
oper_snomask = "+s"; oper_snomask = "+s";
burst_away = yes; burst_away = yes;
nick_delay = 0 seconds; # 15 minutes if you want to enable this nick_delay = 0 seconds; # 15 minutes if you want to enable this
reject_ban_time = 1 minute; reject_ban_time = 1 minute;
reject_after_count = 3; reject_after_count = 3;
@ -597,7 +599,7 @@ general {
throttle_duration = 60; throttle_duration = 60;
throttle_count = 4; throttle_count = 4;
expire_override_time = 5 minutes; expire_override_time = 5 minutes;
away_interval = 30; away_interval = 30;
}; };
modules { modules {

View File

@ -1,2 +1,2 @@
This is ShadowIRCd MOTD. You might replace it, but if not, your friends will This is the Elemental-IRCd MOTD. You can use this if you like;
laugh at you. but if you do, your teacher may send you to magic kindergarten.

View File

@ -53,6 +53,7 @@ SRCS = \
force_user_invis.c \ force_user_invis.c \
hurt.c \ hurt.c \
ip_cloaking.c \ ip_cloaking.c \
ip_cloaking-5.c \
sno_farconnect.c \ sno_farconnect.c \
sno_globalkline.c \ sno_globalkline.c \
sno_globaloper.c \ sno_globaloper.c \

169
extensions/ip_cloaking-5.c Normal file
View File

@ -0,0 +1,169 @@
/*
* Charybdis: an advanced ircd
* ip_cloaking.c: provide user hostname cloaking
*
* Written originally by nenolod, altered to use FNV by Elizabeth in 2008
* altered some more by groente
*/
#include <openssl/hmac.h>
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "hash.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
#include "newconf.h"
char *secretsalt = "32qwnqoWI@DpMd&w";
static void
conf_set_secretsalt(void *data)
{
secretsalt = rb_strdup(data);
}
static int
_modinit(void)
{
/* add the usermode to the available slot */
user_modes['x'] = find_umode_slot();
construct_umodebuf();
add_top_conf("cloaking", NULL, NULL, NULL);
add_conf_item("cloaking", "secretsalt", CF_QSTRING, conf_set_secretsalt);
return 0;
}
static void
_moddeinit(void)
{
/* disable the umode and remove it from the available list */
user_modes['x'] = 0;
construct_umodebuf();
add_top_conf("cloaking", NULL, NULL, NULL);
add_conf_item("cloaking", "secretsalt", CF_QSTRING, conf_set_secretsalt);
}
static void check_umode_change(void *data);
static void check_new_user(void *data);
mapi_hfn_list_av1 ip_cloaking_hfnlist[] = {
{ "umode_changed", (hookfn) check_umode_change },
{ "new_local_user", (hookfn) check_new_user },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL,
ip_cloaking_hfnlist, "$Revision: 3526 $");
static void
distribute_hostchange(struct Client *client_p, char *newhost)
{
if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
newhost);
else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
newhost);
sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");
if (newhost != client_p->orighost)
SetDynSpoof(client_p);
else
ClearDynSpoof(client_p);
}
static void
do_host_cloak(const char *inbuf, char *outbuf)
{
unsigned char *hash;
char buf[3];
char output[HOSTLEN+1];
int i;
hash = HMAC(EVP_sha256(), secretsalt, strlen(secretsalt), (unsigned char*)inbuf, strlen(inbuf), NULL, NULL);
output[0]=0;
for (i = 0; i < 32; i++) {
sprintf(buf, "%.2x", hash[i]);
strcat(output,buf);
}
rb_strlcpy(outbuf,output,HOSTLEN+1);
}
static void
check_umode_change(void *vdata)
{
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
struct Client *source_p = data->client;
if (!MyClient(source_p))
return;
/* didn't change +h umode, we don't need to do anything */
if (!((data->oldumodes ^ source_p->umodes) & user_modes['x']))
return;
if (source_p->umodes & user_modes['h'])
{
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost)))
{
source_p->umodes &= ~user_modes['x'];
return;
}
if (strcmp(source_p->host, source_p->localClient->mangledhost))
{
distribute_hostchange(source_p, source_p->localClient->mangledhost);
}
else /* not really nice, but we need to send this numeric here */
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
source_p->host);
}
else if (!(source_p->umodes & user_modes['x']))
{
if (source_p->localClient->mangledhost != NULL &&
!strcmp(source_p->host, source_p->localClient->mangledhost))
{
distribute_hostchange(source_p, source_p->orighost);
}
}
}
static void
check_new_user(void *vdata)
{
struct Client *source_p = (void *)vdata;
if (IsIPSpoof(source_p))
{
source_p->umodes &= ~user_modes['x'];
return;
}
source_p->localClient->mangledhost = rb_malloc(HOSTLEN + 1);
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost);
if (IsDynSpoof(source_p))
source_p->umodes &= ~user_modes['x'];
if (source_p->umodes & user_modes['x'])
{
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
if (irccmp(source_p->host, source_p->orighost))
SetDynSpoof(source_p);
}
}

View File

@ -310,9 +310,9 @@ extern void user_join(struct Client * client_p, struct Client * source_p, const
extern void do_join_0(struct Client *client_p, struct Client *source_p); extern void do_join_0(struct Client *client_p, struct Client *source_p);
extern int check_channel_name_loc(struct Client *source_p, const char *name); extern int check_channel_name_loc(struct Client *source_p, const char *name);
extern struct Metadata *channel_metadata_add(struct Channel *target, const char *name, const char *value, int propegate); extern struct Metadata *channel_metadata_add(struct Channel *target, const char *name, const char *value, int propagate);
extern struct Metadata *channel_metadata_time_add(struct Channel *target, const char *name, time_t timevalue, const char *value); extern struct Metadata *channel_metadata_time_add(struct Channel *target, const char *name, time_t timevalue, const char *value);
extern void channel_metadata_delete(struct Channel *target, const char *name, int propegate); extern void channel_metadata_delete(struct Channel *target, const char *name, int propagate);
extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name); extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
extern void channel_metadata_clear(struct Channel *target); extern void channel_metadata_clear(struct Channel *target);

View File

@ -616,8 +616,8 @@ extern char *generate_uid(void);
void allocate_away(struct Client *); void allocate_away(struct Client *);
void free_away(struct Client *); void free_away(struct Client *);
extern struct Metadata *user_metadata_add(struct Client *target, const char *name, const char *value, int propegate); extern struct Metadata *user_metadata_add(struct Client *target, const char *name, const char *value, int propagate);
extern void user_metadata_delete(struct Client *target, const char *name, int propegate); extern void user_metadata_delete(struct Client *target, const char *name, int propagate);
extern struct Metadata *user_metadata_find(struct Client *target, const char *name); extern struct Metadata *user_metadata_find(struct Client *target, const char *name);
extern void user_metadata_clear(struct Client *target); extern void user_metadata_clear(struct Client *target);

View File

@ -240,7 +240,7 @@
/* Directory where binaries the IRCd itself spawns live */ /* Directory where binaries the IRCd itself spawns live */
#undef PKGLIBEXECDIR #undef PKGLIBEXECDIR
/* Directory in which to store state, such as band database */ /* Directory in which to store state, such as ban database */
#undef PKGLOCALSTATEDIR #undef PKGLOCALSTATEDIR
/* Directory to store pidfile in. */ /* Directory to store pidfile in. */

View File

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994-2013 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -16,6 +15,51 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
@ -35,12 +79,12 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = . subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/libratbox.pc.in \ $(top_srcdir)/configure $(am__configure_deps) \
$(top_srcdir)/configure \ $(top_srcdir)/include/libratbox_config.h.in \
$(top_srcdir)/include/libratbox_config.h.in COPYING ChangeLog \ $(srcdir)/libratbox.pc.in COPYING ChangeLog INSTALL README \
INSTALL TODO config.guess config.sub depcomp install-sh \ TODO compile config.guess config.sub depcomp install-sh \
ltmain.sh missing missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
@ -52,15 +96,33 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/libratbox_config.h CONFIG_HEADER = $(top_builddir)/include/libratbox_config.h
CONFIG_CLEAN_FILES = libratbox.pc CONFIG_CLEAN_FILES = libratbox.pc
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
html-recursive info-recursive install-data-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \
install-dvi-recursive install-exec-recursive \ install-data-recursive install-dvi-recursive \
install-html-recursive install-info-recursive \ install-exec-recursive install-html-recursive \
install-pdf-recursive install-ps-recursive install-recursive \ install-info-recursive install-pdf-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \
ps-recursive uninstall-recursive installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \ am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -82,23 +144,53 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(pkgconfigdir)" am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
DATA = $(pkgconfig_DATA) DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ $(RECURSIVE_TARGETS) \
distdir dist dist-all distcheck $(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
am__remove_distdir = \ am__remove_distdir = \
{ test ! -d "$(distdir)" \ if test -d "$(distdir)"; then \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; } && rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \ am__relativize = \
dir0=`pwd`; \ dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@ -126,11 +218,15 @@ am__relativize = \
reldir="$$dir2" reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@ ALLOCA = @ALLOCA@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@ -266,7 +362,7 @@ pkgconfig_DATA = libratbox.pc
all: all-recursive all: all-recursive
.SUFFIXES: .SUFFIXES:
am--refresh: am--refresh: Makefile
@: @:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
@ -302,10 +398,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
include/libratbox_config.h: include/stamp-h1 include/libratbox_config.h: include/stamp-h1
@if test ! -f $@; then \ @test -f $@ || rm -f include/stamp-h1
rm -f include/stamp-h1; \ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1
$(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; \
else :; fi
include/stamp-h1: $(top_srcdir)/include/libratbox_config.h.in $(top_builddir)/config.status include/stamp-h1: $(top_srcdir)/include/libratbox_config.h.in $(top_builddir)/config.status
@rm -f include/stamp-h1 @rm -f include/stamp-h1
@ -330,8 +424,11 @@ distclean-libtool:
-rm -f libtool config.lt -rm -f libtool config.lt
install-pkgconfigDATA: $(pkgconfig_DATA) install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \ echo "$$d$$p"; \
@ -345,27 +442,28 @@ uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run 'make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles, # To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status' # (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS): $(am__recursive_targets):
@fail= failcom='exit 1'; \ @fail=; \
for f in x $$MAKEFLAGS; do \ if $(am__make_keepgoing); then \
case $$f in \ failcom='fail=yes'; \
*=* | --[!k]*);; \ else \
*k*) failcom='fail=yes';; \ failcom='exit 1'; \
esac; \ fi; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \ echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \ if test "$$subdir" = "."; then \
dot_seen=yes; \ dot_seen=yes; \
@ -380,57 +478,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail" fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS): ID: $(am__tagged_files)
@fail= failcom='exit 1'; \ $(am__define_uniq_tagged_files); mkid -fID $$unique
for f in x $$MAKEFLAGS; do \ tags: tags-recursive
case $$f in \ TAGS: tags
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \ set x; \
here=`pwd`; \ here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@ -446,12 +499,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \ fi; \
done; \ done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ $(am__define_uniq_tagged_files); \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \ shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
@ -463,15 +511,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \ $$unique; \
fi; \ fi; \
fi fi
ctags: CTAGS ctags: ctags-recursive
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) CTAGS: ctags
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
unique=`for i in $$list; do \ $(am__define_uniq_tagged_files); \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique $$unique
@ -480,9 +524,31 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \ && $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here" && gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
@ -518,13 +584,10 @@ distdir: $(DISTFILES)
done done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \ $(am__make_dryrun) \
|| $(MKDIR_P) "$(distdir)/$$subdir" \ || test -d "$(distdir)/$$subdir" \
|| exit 1; \ || $(MKDIR_P) "$(distdir)/$$subdir" \
fi; \ || exit 1; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \ $(am__relativize); \
new_distdir=$$reldir; \ new_distdir=$$reldir; \
@ -553,36 +616,42 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir) $(am__post_remove_distdir)
dist-lzma: distdir dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir) $(am__post_remove_distdir)
dist-xz: distdir dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir) $(am__post_remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir) $(am__post_remove_distdir)
dist-shar: distdir dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
-rm -f $(distdir).zip -rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir) zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir) $(am__post_remove_distdir)
dist dist-all: distdir dist dist-all:
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__remove_distdir) $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then # This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another # it guarantees that the distribution is self-contained by making another
@ -593,8 +662,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \ *.tar.lz*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \ *.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
@ -604,17 +673,19 @@ distcheck: dist
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac
chmod -R a-w $(distdir); chmod a+w $(distdir) chmod -R a-w $(distdir)
mkdir $(distdir)/_build chmod u+w $(distdir)
mkdir $(distdir)/_inst mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir) chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \ test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \ && $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \ && ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
@ -637,13 +708,21 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \ && cd "$$am__cwd" \
|| exit 1 || exit 1
$(am__remove_distdir) $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \ @(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck: distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \ @test -n '$(distuninstallcheck_dir)' || { \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \ || { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \ if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \ echo " (check DESTDIR support)"; \
@ -677,10 +756,15 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
@ -762,25 +846,24 @@ ps-am:
uninstall-am: uninstall-pkgconfigDATA uninstall-am: uninstall-pkgconfigDATA
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ .MAKE: $(am__recursive_targets) install-am install-strip
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
all all-am am--refresh check check-am clean clean-generic \ am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
distcheck distclean distclean-generic distclean-hdr \ dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \ distclean-hdr distclean-libtool distclean-tags distcleancheck \
distuninstallcheck dvi dvi-am html html-am info info-am \ distdir distuninstallcheck dvi dvi-am html html-am info \
install install-am install-data install-data-am install-dvi \ info-am install install-am install-data install-data-am \
install-dvi-am install-exec install-exec-am install-html \ install-dvi install-dvi-am install-exec install-exec-am \
install-html-am install-info install-info-am install-man \ install-html install-html-am install-info install-info-am \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-man install-pdf install-pdf-am install-pkgconfigDATA \
install-ps-am install-strip installcheck installcheck-am \ install-ps install-ps-am install-strip installcheck \
installdirs installdirs-am maintainer-clean \ installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \ maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall uninstall-am uninstall-pkgconfigDATA uninstall-am uninstall-pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.

1119
libratbox/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

347
libratbox/compile Executable file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

874
libratbox/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,9 @@
/* Define to 1 if you have the `gmtime_r' function. */ /* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R #undef HAVE_GMTIME_R
/* Has GnuTLS */
#undef HAVE_GNUTLS
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H

123
libratbox/ltmain.sh Executable file → Normal file
View File

@ -1,9 +1,9 @@
# libtool (GNU libtool) 2.4 # libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO # This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@ -41,6 +41,7 @@
# --quiet, --silent don't print informational messages # --quiet, --silent don't print informational messages
# --no-quiet, --no-silent # --no-quiet, --no-silent
# print informational messages (default) # print informational messages (default)
# --no-warn don't display warning messages
# --tag=TAG use configuration variables from tag TAG # --tag=TAG use configuration variables from tag TAG
# -v, --verbose print more informational messages than default # -v, --verbose print more informational messages than default
# --no-verbose don't print the extra informational messages # --no-verbose don't print the extra informational messages
@ -69,7 +70,7 @@
# compiler: $LTCC # compiler: $LTCC
# compiler flags: $LTCFLAGS # compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld) # linker: $LD (gnu? $with_gnu_ld)
# $progname: (GNU libtool) 2.4 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
# automake: $automake_version # automake: $automake_version
# autoconf: $autoconf_version # autoconf: $autoconf_version
# #
@ -79,9 +80,9 @@
PROGRAM=libtool PROGRAM=libtool
PACKAGE=libtool PACKAGE=libtool
VERSION=2.4 VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
TIMESTAMP="" TIMESTAMP=""
package_revision=1.3293 package_revision=1.3337
# Be Bourne compatible # Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@ -136,15 +137,10 @@ progpath="$0"
: ${CP="cp -f"} : ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${EGREP="grep -E"}
: ${FGREP="grep -F"}
: ${GREP="grep"}
: ${LN_S="ln -s"}
: ${MAKE="make"} : ${MAKE="make"}
: ${MKDIR="mkdir"} : ${MKDIR="mkdir"}
: ${MV="mv -f"} : ${MV="mv -f"}
: ${RM="rm -f"} : ${RM="rm -f"}
: ${SED="sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"} : ${Xsed="$SED -e 1s/^X//"}
@ -387,7 +383,7 @@ case $progpath in
;; ;;
*) *)
save_IFS="$IFS" save_IFS="$IFS"
IFS=: IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do for progdir in $PATH; do
IFS="$save_IFS" IFS="$save_IFS"
test -x "$progdir/$progname" && break test -x "$progdir/$progname" && break
@ -771,8 +767,8 @@ func_help ()
s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LTCFLAGS*'"$LTCFLAGS"'*
s*\$LD*'"$LD"'* s*\$LD*'"$LD"'*
s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$with_gnu_ld/'"$with_gnu_ld"'/
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
p p
d d
} }
@ -1052,6 +1048,7 @@ opt_finish=false
opt_help=false opt_help=false
opt_help_all=false opt_help_all=false
opt_silent=: opt_silent=:
opt_warning=:
opt_verbose=: opt_verbose=:
opt_silent=false opt_silent=false
opt_verbose=false opt_verbose=false
@ -1118,6 +1115,10 @@ esac
;; ;;
--no-silent|--no-quiet) --no-silent|--no-quiet)
opt_silent=false opt_silent=false
func_append preserve_args " $opt"
;;
--no-warning|--no-warn)
opt_warning=false
func_append preserve_args " $opt" func_append preserve_args " $opt"
;; ;;
--no-verbose) --no-verbose)
@ -2059,7 +2060,7 @@ func_mode_compile ()
*.[cCFSifmso] | \ *.[cCFSifmso] | \
*.ada | *.adb | *.ads | *.asm | \ *.ada | *.adb | *.ads | *.asm | \
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
*.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
func_xform "$libobj" func_xform "$libobj"
libobj=$func_xform_result libobj=$func_xform_result
;; ;;
@ -3201,11 +3202,13 @@ func_mode_install ()
# Set up the ranlib parameters. # Set up the ranlib parameters.
oldlib="$destdir/$name" oldlib="$destdir/$name"
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
tool_oldlib=$func_to_tool_file_result
func_show_eval "$install_prog \$file \$oldlib" 'exit $?' func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
if test -n "$stripme" && test -n "$old_striplib"; then if test -n "$stripme" && test -n "$old_striplib"; then
func_show_eval "$old_striplib $oldlib" 'exit $?' func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
fi fi
# Do each command in the postinstall commands. # Do each command in the postinstall commands.
@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() {
# linked before any other PIC object. But we must not use # linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in # pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
*-*-hpux*) *-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;; pic_flag_for_symtable=" $pic_flag" ;;
@ -3982,14 +3985,17 @@ func_exec_program_core ()
# launches target application with the remaining arguments. # launches target application with the remaining arguments.
func_exec_program () func_exec_program ()
{ {
for lt_wr_arg case \" \$* \" in
do *\\ --lt-*)
case \$lt_wr_arg in for lt_wr_arg
--lt-*) ;; do
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;; case \$lt_wr_arg in
esac --lt-*) ;;
shift *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
done esac
shift
done ;;
esac
func_exec_program_core \${1+\"\$@\"} func_exec_program_core \${1+\"\$@\"}
} }
@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f)
{ {
EOF EOF
func_emit_wrapper yes | func_emit_wrapper yes |
$SED -e 's/\([\\"]\)/\\\1/g' \ $SED -n -e '
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/' s/^\(.\{79\}\)\(..*\)/\1\
\2/
h
s/\([\\"]\)/\\\1/g
s/$/\\n/
s/\([^\n]*\).*/ fputs ("\1", f);/p
g
D'
cat <<"EOF" cat <<"EOF"
} }
EOF EOF
@ -5643,7 +5655,8 @@ func_mode_link ()
continue continue
;; ;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg" func_append compiler_flags " $arg"
func_append compile_command " $arg" func_append compile_command " $arg"
func_append finalize_command " $arg" func_append finalize_command " $arg"
@ -6111,7 +6124,10 @@ func_mode_link ()
case $pass in case $pass in
dlopen) libs="$dlfiles" ;; dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;; dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; link)
libs="$deplibs %DEPLIBS%"
test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
;;
esac esac
fi fi
if test "$linkmode,$pass" = "lib,dlpreopen"; then if test "$linkmode,$pass" = "lib,dlpreopen"; then
@ -6147,7 +6163,8 @@ func_mode_link ()
lib= lib=
found=no found=no
case $deplib in case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test "$linkmode,$pass" = "prog,link"; then if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs" compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs" finalize_deplibs="$deplib $finalize_deplibs"
@ -6430,19 +6447,19 @@ func_mode_link ()
# It is a libtool convenience library, so add in its objects. # It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library" func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library"
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
fi
func_append tmp_libs " $deplib"
done
elif test "$linkmode" != prog && test "$linkmode" != lib; then elif test "$linkmode" != prog && test "$linkmode" != lib; then
func_fatal_error "\`$lib' is not a convenience library" func_fatal_error "\`$lib' is not a convenience library"
fi fi
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
fi
func_append tmp_libs " $deplib"
done
continue continue
fi # $pass = conv fi # $pass = conv
@ -6831,7 +6848,7 @@ func_mode_link ()
test "$hardcode_direct_absolute" = no; then test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib" add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir" add_dir="-L$absdir"
# Try looking first in the location we're being installed to. # Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then if test -n "$inst_prefix_dir"; then
case $libdir in case $libdir in
@ -7316,6 +7333,7 @@ func_mode_link ()
# which has an extra 1 added just for fun # which has an extra 1 added just for fun
# #
case $version_type in case $version_type in
# correct linux to gnu/linux during the next big refactor
darwin|linux|osf|windows|none) darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor func_arith $number_major + $number_minor
current=$func_arith_result current=$func_arith_result
@ -7334,6 +7352,9 @@ func_mode_link ()
revision="$number_minor" revision="$number_minor"
lt_irix_increment=no lt_irix_increment=no
;; ;;
*)
func_fatal_configuration "$modename: unknown library version type \`$version_type'"
;;
esac esac
;; ;;
no) no)
@ -7432,7 +7453,7 @@ func_mode_link ()
versuffix="$major.$revision" versuffix="$major.$revision"
;; ;;
linux) linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age func_arith $current - $age
major=.$func_arith_result major=.$func_arith_result
versuffix="$major.$age.$revision" versuffix="$major.$age.$revision"
@ -8020,6 +8041,11 @@ EOF
# Test again, we may have decided not to build it any more # Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then if test "$build_libtool_libs" = yes; then
# Remove ${wl} instances when linking with ld.
# FIXME: should test the right _cmds variable.
case $archive_cmds in
*\$LD\ *) wl= ;;
esac
if test "$hardcode_into_libs" = yes; then if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths # Hardcode the library paths
hardcode_libdirs= hardcode_libdirs=
@ -8050,7 +8076,7 @@ EOF
elif test -n "$runpath_var"; then elif test -n "$runpath_var"; then
case "$perm_rpath " in case "$perm_rpath " in
*" $libdir "*) ;; *" $libdir "*) ;;
*) func_apped perm_rpath " $libdir" ;; *) func_append perm_rpath " $libdir" ;;
esac esac
fi fi
done done
@ -8058,11 +8084,7 @@ EOF
if test -n "$hardcode_libdir_separator" && if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs" libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
fi fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var. # We should set the runpath_var.
@ -9152,6 +9174,8 @@ EOF
esac esac
done done
fi fi
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
tool_oldlib=$func_to_tool_file_result
eval cmds=\"$old_archive_cmds\" eval cmds=\"$old_archive_cmds\"
func_len " $cmds" func_len " $cmds"
@ -9261,7 +9285,8 @@ EOF
*.la) *.la)
func_basename "$deplib" func_basename "$deplib"
name="$func_basename_result" name="$func_basename_result"
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` func_resolve_sysroot "$deplib"
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \ test -z "$libdir" && \
func_fatal_error "\`$deplib' is not a valid libtool archive" func_fatal_error "\`$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"

View File

@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am. # Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994-2013 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -18,6 +17,51 @@
# $Id: Makefile.am 26046 2008-09-09 16:37:30Z androsyn $ # $Id: Makefile.am 26046 2008-09-09 16:37:30Z androsyn $
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
@ -37,7 +81,8 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = src subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/configure.ac
@ -68,6 +113,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) LTLIBRARIES = $(lib_LTLIBRARIES)
libratbox_la_DEPENDENCIES = libratbox_la_DEPENDENCIES =
@ -77,30 +128,78 @@ am_libratbox_la_OBJECTS = unix.lo win32.lo crypt.lo balloc.lo \
devpoll.lo epoll.lo poll.lo ports.lo sigio.lo select.lo \ devpoll.lo epoll.lo poll.lo ports.lo sigio.lo select.lo \
kqueue.lo rawbuf.lo patricia.lo arc4random.lo version.lo kqueue.lo rawbuf.lo patricia.lo arc4random.lo version.lo
libratbox_la_OBJECTS = $(am_libratbox_la_OBJECTS) libratbox_la_OBJECTS = $(am_libratbox_la_OBJECTS)
libratbox_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libratbox_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libratbox_la_LDFLAGS) $(LDFLAGS) -o $@ $(libratbox_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles am__depfiles_maybe = depfiles
am__mv = mv -f am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC) CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(LDFLAGS) -o $@ $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libratbox_la_SOURCES) SOURCES = $(libratbox_la_SOURCES)
DIST_SOURCES = $(libratbox_la_SOURCES) DIST_SOURCES = $(libratbox_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@ ALLOCA = @ALLOCA@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
AS = @AS@ AS = @AS@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
@ -298,9 +397,9 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES) install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \ list2=; for p in $$list; do \
if test -f $$p; then \ if test -f $$p; then \
@ -308,6 +407,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \ else :; fi; \
done; \ done; \
test -z "$$list2" || { \ test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
} }
@ -323,14 +424,17 @@ uninstall-libLTLIBRARIES:
clean-libLTLIBRARIES: clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \ @list='$(lib_LTLIBRARIES)'; \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ locs=`for p in $$list; do echo $$p; done | \
test "$$dir" != "$$p" || dir=.; \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
echo "rm -f \"$${dir}/so_locations\""; \ sort -u`; \
rm -f "$${dir}/so_locations"; \ test -z "$$locs" || { \
done echo rm -f $${locs}; \
libratbox.la: $(libratbox_la_OBJECTS) $(libratbox_la_DEPENDENCIES) rm -f $${locs}; \
$(libratbox_la_LINK) -rpath $(libdir) $(libratbox_la_OBJECTS) $(libratbox_la_LIBADD) $(LIBS) }
libratbox.la: $(libratbox_la_OBJECTS) $(libratbox_la_DEPENDENCIES) $(EXTRA_libratbox_la_DEPENDENCIES)
$(AM_V_CCLD)$(libratbox_la_LINK) -rpath $(libdir) $(libratbox_la_OBJECTS) $(libratbox_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@ -366,25 +470,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -392,26 +496,15 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(am__tagged_files)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ $(am__define_uniq_tagged_files); mkid -fID $$unique
unique=`for i in $$list; do \ tags: tags-am
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ TAGS: tags
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(TAGS_FILES) $(LISP)
set x; \ set x; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ $(am__define_uniq_tagged_files); \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \ shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
@ -423,15 +516,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \ $$unique; \
fi; \ fi; \
fi fi
ctags: CTAGS ctags: ctags-am
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) CTAGS: ctags
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
unique=`for i in $$list; do \ $(am__define_uniq_tagged_files); \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique $$unique
@ -440,6 +529,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \ && $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here" && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@ -493,10 +597,15 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ if test -z '$(STRIP)'; then \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
@ -582,19 +691,19 @@ uninstall-am: uninstall-libLTLIBRARIES
.MAKE: all check install install-am install-strip .MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
distclean-compile distclean-generic distclean-libtool \ ctags-am distclean distclean-compile distclean-generic \
distclean-tags distdir dvi dvi-am html html-am info info-am \ distclean-libtool distclean-tags distdir dvi dvi-am html \
install install-am install-data install-data-am install-dvi \ html-am info info-am install install-am install-data \
install-dvi-am install-exec install-exec-am install-html \ install-data-am install-dvi install-dvi-am install-exec \
install-html-am install-info install-info-am \ install-exec-am install-html install-html-am install-info \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-info-am install-libLTLIBRARIES install-man install-pdf \
install-ps install-ps-am install-strip installcheck \ install-pdf-am install-ps install-ps-am install-strip \
installcheck-am installdirs maintainer-clean \ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
version.c: version.c.SH ../CREDITS version.c: version.c.SH ../CREDITS

View File

@ -150,8 +150,8 @@ put_dec(char *buf, unsigned long long int num)
#define SPECIAL 32 /* 0x */ #define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
static char * static size_t
number(char *buf, char *end, unsigned long long int num, int base, int size, int precision, number(char *const buf, const size_t size, size_t idx, unsigned long long int num, int base, int field_width, int precision,
int type) int type)
{ {
char sign, tmp[66]; char sign, tmp[66];
@ -166,7 +166,7 @@ number(char *buf, char *end, unsigned long long int num, int base, int size, int
if(type & LEFT) if(type & LEFT)
type &= ~ZEROPAD; type &= ~ZEROPAD;
if(base < 2 || base > 36) if(base < 2 || base > 36)
return NULL; return idx;
sign = 0; sign = 0;
if(type & SIGN) if(type & SIGN)
{ {
@ -174,24 +174,24 @@ number(char *buf, char *end, unsigned long long int num, int base, int size, int
{ {
sign = '-'; sign = '-';
num = -(signed long long int)num; num = -(signed long long int)num;
size--; field_width--;
} }
else if(type & PLUS) else if(type & PLUS)
{ {
sign = '+'; sign = '+';
size--; field_width--;
} }
else if(type & SPACE) else if(type & SPACE)
{ {
sign = ' '; sign = ' ';
size--; field_width--;
} }
} }
if(need_pfx) if(need_pfx)
{ {
size--; field_width--;
if(base == 16) if(base == 16)
size--; field_width--;
} }
/* generate full string in tmp[], in reverse order */ /* generate full string in tmp[], in reverse order */
@ -225,69 +225,69 @@ number(char *buf, char *end, unsigned long long int num, int base, int size, int
if(i > precision) if(i > precision)
precision = i; precision = i;
/* leading space padding */ /* leading space padding */
size -= precision; field_width -= precision;
if(!(type & (ZEROPAD + LEFT))) if(!(type & (ZEROPAD + LEFT)))
{ {
while(--size >= 0) while(--field_width >= 0)
{ {
if(buf < end) if(idx < size)
*buf = ' '; buf[idx] = ' ';
++buf; ++idx;
} }
} }
/* sign */ /* sign */
if(sign) if(sign)
{ {
if(buf < end) if(idx < size)
*buf = sign; buf[idx] = sign;
++buf; ++idx;
} }
/* "0x" / "0" prefix */ /* "0x" / "0" prefix */
if(need_pfx) if(need_pfx)
{ {
if(buf < end) if(idx < size)
*buf = '0'; buf[idx] = '0';
++buf; ++idx;
if(base == 16) if(base == 16)
{ {
if(buf < end) if(idx < size)
*buf = digits[16]; /* for arbitrary base: digits[33]; */ buf[idx] = digits[16]; /* for arbitrary base: digits[33]; */
++buf; ++idx;
} }
} }
/* zero or space padding */ /* zero or space padding */
if(!(type & LEFT)) if(!(type & LEFT))
{ {
char c = (type & ZEROPAD) ? '0' : ' '; char c = (type & ZEROPAD) ? '0' : ' ';
while(--size >= 0) while(--field_width >= 0)
{ {
if(buf < end) if(idx < size)
*buf = c; buf[idx] = c;
++buf; ++idx;
} }
} }
/* hmm even more zero padding? */ /* hmm even more zero padding? */
while(i <= --precision) while(i <= --precision)
{ {
if(buf < end) if(idx < size)
*buf = '0'; buf[idx] = '0';
++buf; ++idx;
} }
/* actual digits of result */ /* actual digits of result */
while(--i >= 0) while(--i >= 0)
{ {
if(buf < end) if(idx < size)
*buf = tmp[i]; buf[idx] = tmp[i];
++buf; ++idx;
} }
/* trailing space padding */ /* trailing space padding */
while(--size >= 0) while(--field_width >= 0)
{ {
if(buf < end) if(idx < size)
*buf = ' '; buf[idx] = ' ';
++buf; ++idx;
} }
return buf; return idx;
} }
/** /**
@ -314,7 +314,8 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
int len; int len;
unsigned long long int num; unsigned long long int num;
int i, base; int i, base;
char *str, *end, c; char c;
size_t idx;
const char *s; const char *s;
int flags; /* flags to number() */ int flags; /* flags to number() */
@ -329,28 +330,20 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
/* Reject out-of-range values early. Large positive sizes are /* Reject out-of-range values early. Large positive sizes are
used for unknown buffer sizes. */ used for unknown buffer sizes. */
if(rb_unlikely((int)size < 0)) if(rb_unlikely(size > INT_MAX))
{ {
return 0; return 0;
} }
str = buf; idx = 0;
end = buf + size;
/* Make sure end is always >= buf */
if(end < buf)
{
end = ((void *)-1);
size = end - buf;
}
for(; *fmt; ++fmt) for(; *fmt; ++fmt)
{ {
if(*fmt != '%') if(*fmt != '%')
{ {
if(str < end) if(idx < size)
*str = *fmt; buf[idx] = *fmt;
++str; ++idx;
continue; continue;
} }
@ -434,20 +427,20 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
{ {
while(--field_width > 0) while(--field_width > 0)
{ {
if(str < end) if(idx < size)
*str = ' '; buf[idx] = ' ';
++str; ++idx;
} }
} }
c = (unsigned char)va_arg(args, int); c = (unsigned char)va_arg(args, int);
if(str < end) if(idx < size)
*str = c; buf[idx] = c;
++str; ++idx;
while(--field_width > 0) while(--field_width > 0)
{ {
if(str < end) if(idx < size)
*str = ' '; buf[idx] = ' ';
++str; ++idx;
} }
continue; continue;
@ -463,23 +456,23 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
{ {
while(len < field_width--) while(len < field_width--)
{ {
if(str < end) if(idx < size)
*str = ' '; buf[idx] = ' ';
++str; ++idx;
} }
} }
for(i = 0; i < len; ++i) for(i = 0; i < len; ++i)
{ {
if(str < end) if(idx < size)
*str = *s; buf[idx] = *s;
++str; ++idx;
++s; ++s;
} }
while(len < field_width--) while(len < field_width--)
{ {
if(str < end) if(idx < size)
*str = ' '; buf[idx] = ' ';
++str; ++idx;
} }
continue; continue;
@ -489,7 +482,7 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
field_width = 2 * sizeof(void *); field_width = 2 * sizeof(void *);
flags |= ZEROPAD; flags |= ZEROPAD;
} }
str = number(str, end, idx = number(buf, size, idx,
(unsigned long)va_arg(args, void *), (unsigned long)va_arg(args, void *),
16, field_width, precision, flags); 16, field_width, precision, flags);
continue; continue;
@ -501,24 +494,24 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if(qualifier == 'l') if(qualifier == 'l')
{ {
long *ip = va_arg(args, long *); long *ip = va_arg(args, long *);
*ip = (str - buf); *ip = idx;
} }
else if(qualifier == 'Z' || qualifier == 'z') else if(qualifier == 'Z' || qualifier == 'z')
{ {
size_t *ip = va_arg(args, size_t *); size_t *ip = va_arg(args, size_t *);
*ip = (str - buf); *ip = idx;
} }
else else
{ {
int *ip = va_arg(args, int *); int *ip = va_arg(args, int *);
*ip = (str - buf); *ip = idx;
} }
continue; continue;
case '%': case '%':
if(str < end) if(idx < size)
*str = '%'; buf[idx] = '%';
++str; ++idx;
continue; continue;
/* integer number formats - set up the flags and "break" */ /* integer number formats - set up the flags and "break" */
@ -539,14 +532,14 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
break; break;
default: default:
if(str < end) if(idx < size)
*str = '%'; buf[idx] = '%';
++str; ++idx;
if(*fmt) if(*fmt)
{ {
if(str < end) if(idx < size)
*str = *fmt; buf[idx] = *fmt;
++str; ++idx;
} }
else else
{ {
@ -582,17 +575,17 @@ rb_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
if(flags & SIGN) if(flags & SIGN)
num = (signed int)num; num = (signed int)num;
} }
str = number(str, end, num, base, field_width, precision, flags); idx = number(buf, size, idx, num, base, field_width, precision, flags);
} }
if(size > 0) if(size > 0)
{ {
if(str < end) if(idx < size)
*str = '\0'; buf[idx] = '\0';
else else
end[-1] = '\0'; buf[size - 1] = '\0';
} }
/* the trailing null byte doesn't count towards the total */ /* the trailing null byte doesn't count towards the total */
return str - buf; return idx;
} }
/** /**

1
ltmain.sh Symbolic link
View File

@ -0,0 +1 @@
/usr/share/libtool/config/ltmain.sh

View File

@ -2084,13 +2084,13 @@ void user_join(struct Client * client_p, struct Client * source_p, const char *
* inputs - pointer to channel struct * inputs - pointer to channel struct
* - name of metadata item you wish to add * - name of metadata item you wish to add
* - value of metadata item * - value of metadata item
* - 1 if metadata should be propegated, 0 if not * - 1 if metadata should be propagated, 0 if not
* output - none * output - none
* side effects - metadata is added to the channel in question * side effects - metadata is added to the channel in question
* - metadata is propegated if propegate is set. * - metadata is propagated if propagate is set.
*/ */
struct Metadata * struct Metadata *
channel_metadata_add(struct Channel *target, const char *name, const char *value, int propegate) channel_metadata_add(struct Channel *target, const char *name, const char *value, int propagate)
{ {
struct Metadata *md; struct Metadata *md;
@ -2100,7 +2100,7 @@ channel_metadata_add(struct Channel *target, const char *name, const char *value
irc_dictionary_add(target->metadata, md->name, md); irc_dictionary_add(target->metadata, md->name, md);
if(propegate) if(propagate)
sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA SET %s %s :%s", sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA SET %s %s :%s",
target->chname, name, value); target->chname, name, value);
@ -2139,10 +2139,10 @@ channel_metadata_time_add(struct Channel *target, const char *name, time_t timev
* - name of metadata item you wish to delete * - name of metadata item you wish to delete
* output - none * output - none
* side effects - metadata is deleted from the channel in question * side effects - metadata is deleted from the channel in question
* - deletion is propegated if propegate is set * - deletion is propagated if propagate is set
*/ */
void void
channel_metadata_delete(struct Channel *target, const char *name, int propegate) channel_metadata_delete(struct Channel *target, const char *name, int propagate)
{ {
struct Metadata *md = channel_metadata_find(target, name); struct Metadata *md = channel_metadata_find(target, name);
@ -2153,7 +2153,7 @@ channel_metadata_delete(struct Channel *target, const char *name, int propegate)
rb_free(md); rb_free(md);
if(propegate) if(propagate)
sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA CLEAR %s %s", sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA CLEAR %s %s",
target->chname, name); target->chname, name);
} }

View File

@ -1938,13 +1938,13 @@ error_exit_client(struct Client *client_p, int error)
* inputs - pointer to client struct * inputs - pointer to client struct
* - name of metadata item you wish to add * - name of metadata item you wish to add
* - value of metadata item * - value of metadata item
* - 1 if metadata should be propegated, 0 if not * - 1 if metadata should be propagated, 0 if not
* output - none * output - none
* side effects - metadata is added to the user in question * side effects - metadata is added to the user in question
* - metadata is propegated if propegate is set. * - metadata is propagated if propagate is set.
*/ */
struct Metadata * struct Metadata *
user_metadata_add(struct Client *target, const char *name, const char *value, int propegate) user_metadata_add(struct Client *target, const char *name, const char *value, int propagate)
{ {
struct Metadata *md; struct Metadata *md;
@ -1954,7 +1954,7 @@ user_metadata_add(struct Client *target, const char *name, const char *value, in
irc_dictionary_add(target->user->metadata, md->name, md); irc_dictionary_add(target->user->metadata, md->name, md);
if(propegate) if(propagate)
sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA SET %s %s :%s", sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA SET %s %s :%s",
target->id, name, value); target->id, name, value);
@ -1968,10 +1968,10 @@ user_metadata_add(struct Client *target, const char *name, const char *value, in
* - name of metadata item you wish to delete * - name of metadata item you wish to delete
* output - none * output - none
* side effects - metadata is deleted from the user in question * side effects - metadata is deleted from the user in question
* - deletion is propegated if propegate is set * - deletion is propagated if propagate is set
*/ */
void void
user_metadata_delete(struct Client *target, const char *name, int propegate) user_metadata_delete(struct Client *target, const char *name, int propagate)
{ {
struct Metadata *md = user_metadata_find(target, name); struct Metadata *md = user_metadata_find(target, name);
@ -1982,7 +1982,7 @@ user_metadata_delete(struct Client *target, const char *name, int propegate)
rb_free(md); rb_free(md);
if(propegate) if(propagate)
sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA CLEAR %s %s", sendto_match_servs(&me, "*", CAP_ENCAP, NOCAPS, "ENCAP * METADATA CLEAR %s %s",
target->id, name); target->id, name);
} }