Version 0.62

- use c99 inttypes
- added new Halflife scan (halflife)
- added Battlefield2 support (gamespy2)
This commit is contained in:
Olaf Rempel 2006-02-02 16:49:14 +01:00
parent ddc42a0968
commit 9b62806411
22 changed files with 1515 additions and 916 deletions

View File

@ -1,3 +1,8 @@
* Thu 25 August 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.62
- use c99 inttypes
- added new Halflife scan (halflife)
- added Battlefield2 support (gamespy2)
* Sun 05 June 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.61 * Sun 05 June 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.61
- reduce per thread stack from 8MB to 64kB (strange pthread_create() defaults..) - reduce per thread stack from 8MB to 64kB (strange pthread_create() defaults..)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am. # Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 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.
@ -247,7 +247,13 @@ uninstall-info-am:
# (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): $(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@ -259,7 +265,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ || eval $$failcom; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -267,7 +273,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -288,7 +300,7 @@ maintainer-clean-recursive:
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ || eval $$failcom; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \

4
TODO
View File

@ -25,6 +25,8 @@ und natuerlich:
Savage: The Battle for Newerth Savage: The Battle for Newerth
Pain Killer Pain Killer
Tribes Vengeance Tribes Vengeance
Star Wars: Battle Front
SWAT 4
- vorhandene parser debuggen & verbessern - vorhandene parser debuggen & verbessern

876
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

6
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-02-10' timestamp='2005-03-24'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -1437,7 +1437,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you the operating system you are using. It is advised that you
download the most up to date version of the config scripts from download the most up to date version of the config scripts from
ftp://ftp.gnu.org/pub/gnu/config/ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please If the version you run ($0) is already up to date, please
send the following data and any information you think might be send the following data and any information you think might be

24
config.sub vendored
View File

@ -253,6 +253,7 @@ case $basic_machine in
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mips64r5900 | mips64r5900el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| msp430 \ | msp430 \
| ns16k | ns32k \ | ns16k | ns32k \
@ -264,7 +265,7 @@ case $basic_machine in
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | dvp | thumb | tic4x | tic80 | tron \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
@ -326,6 +327,7 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
| mips64r5900-* | mips64r5900el-* \
| mmix-* \ | mmix-* \
| msp430-* \ | msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
@ -665,6 +667,24 @@ case $basic_machine in
basic_machine=m68k-atari basic_machine=m68k-atari
os=-mint os=-mint
;; ;;
mipsEE* | ee | ps2)
basic_machine=mips64r5900el-scei
case $os in
-linux*)
;;
*)
os=-elf
;;
esac
;;
iop)
basic_machine=mipsel-scei
os=-irx
;;
dvp)
basic_machine=dvp-scei
os=-elf
;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;; ;;
@ -1178,7 +1198,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)

1033
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
dnl projekname, version, bugsto dnl projekname, version, bugsto
AC_INIT(hlswmaster, 0.61, [Olaf Rempel <razzor@kopf-tisch.de>]) AC_INIT(hlswmaster, 0.62, [Olaf Rempel <razzor@kopf-tisch.de>])
dnl same for automake dnl same for automake
AM_INIT_AUTOMAKE(hlswmaster, 0.61) AM_INIT_AUTOMAKE(hlswmaster, 0.62)
dnl do not rebuild configure dnl do not rebuild configure
AM_MAINTAINER_MODE AM_MAINTAINER_MODE

View File

@ -1,6 +1,8 @@
#ifndef _HLSWMASTER_H #ifndef _HLSWMASTER_H
#define _HLSWMASTER_H #define _HLSWMASTER_H
#include <inttypes.h>
#include "list.h" #include "list.h"
#include "netpkt.h" #include "netpkt.h"
@ -8,10 +10,10 @@ struct game_server {
struct list_head list; struct list_head list;
unsigned long modtime; unsigned long modtime;
u_int16_t gameid; uint16_t gameid;
u_int32_t ip; uint32_t ip;
u_int16_t port1; uint16_t port1;
u_int16_t port2; uint16_t port2;
} __attribute__ ((packed)); } __attribute__ ((packed));

View File

@ -1,11 +1,13 @@
#ifndef _PLUGIN_HELPER_H #ifndef _PLUGIN_HELPER_H
#define _PLUGIN_HELPER_H #define _PLUGIN_HELPER_H
#include <inttypes.h>
#include "netpkt.h" #include "netpkt.h"
#include "list.h" #include "list.h"
#include "plugin.h" #include "plugin.h"
extern int server_add(u_int16_t gameid, u_int32_t ip, u_int16_t port1, u_int16_t port2); extern int server_add(uint16_t gameid, uint32_t ip, uint16_t port1, uint16_t port2);
struct scan_ports { struct scan_ports {
unsigned short portlo; unsigned short portlo;

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2004-12-17.09 scriptversion=2005-02-02.21
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -109,7 +109,7 @@ while test -n "$1"; do
shift shift
continue;; continue;;
--help) echo "$usage"; exit 0;; --help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2" -m) chmodcmd="$chmodprog $2"
shift shift
@ -134,7 +134,7 @@ while test -n "$1"; do
shift shift
continue;; continue;;
--version) echo "$0 $scriptversion"; exit 0;; --version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create. *) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.

362
ltmain.sh
View File

@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services. # ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure. # NOTE: Changing this file will not affect anything until you rerun configure.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# #
@ -17,7 +17,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -46,14 +46,21 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh PROGRAM=ltmain.sh
PACKAGE=libtool PACKAGE=libtool
VERSION=1.5.10 VERSION=1.5.18
TIMESTAMP=" (1.1220.2.131 2004/09/19 12:46:56)" TIMESTAMP=" (1.1220.2.246 2005/05/16 10:00:18)"
# See if we are running on zsh, and set the options which allow our # See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes. # commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST setopt NO_GLOB_SUBST
fi fi
# Same for EGREP, and just to be sure, do LTCC as well
if test "X$EGREP" = X ; then
EGREP=egrep
fi
if test "X$LTCC" = X ; then
LTCC=${CC-gcc}
fi
# Check that we have a working $echo. # Check that we have a working $echo.
if test "X$1" = X--no-reexec; then if test "X$1" = X--no-reexec; then
@ -115,8 +122,9 @@ if test "${LANG+set}" = set; then
fi fi
# Make sure IFS has a sensible default # Make sure IFS has a sensible default
: ${IFS=" lt_nl='
"} '
IFS=" $lt_nl"
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2 $echo "$modename: not configured to build any kind of library" 1>&2
@ -135,6 +143,7 @@ show_help=
execute_dlfiles= execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/" lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/" o2lo="s/\\.${objext}\$/.lo/"
quote_scanset='[[~#^*{};<>?'"'"' ]'
if test -z "$max_cmd_len"; then if test -z "$max_cmd_len"; then
i=0 i=0
@ -170,7 +179,8 @@ fi
# Need a lot of goo to handle *both* DLLs and import libs # Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument # Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called. # that is supplied when $file_magic_command is called.
func_win32_libid () { func_win32_libid ()
{
win32_libid_type="unknown" win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null` win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in case $win32_fileres in
@ -210,12 +220,13 @@ func_win32_libid () {
# Only attempt this if the compiler in the base compile # Only attempt this if the compiler in the base compile
# command doesn't match the default compiler. # command doesn't match the default compiler.
# arg is usually of the form 'gcc ...' # arg is usually of the form 'gcc ...'
func_infer_tag () { func_infer_tag ()
{
if test -n "$available_tags" && test -z "$tagname"; then if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted= CC_quoted=
for arg in $CC; do for arg in $CC; do
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -236,7 +247,7 @@ func_infer_tag () {
for arg in $CC; do for arg in $CC; do
# Double-quote args containing other shell metacharacters. # Double-quote args containing other shell metacharacters.
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -279,8 +290,25 @@ func_infer_tag () {
} }
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
fi
}
# func_extract_archives gentop oldlib ... # func_extract_archives gentop oldlib ...
func_extract_archives () { func_extract_archives ()
{
my_gentop="$1"; shift my_gentop="$1"; shift
my_oldlibs=${1+"$@"} my_oldlibs=${1+"$@"}
my_oldobjs="" my_oldobjs=""
@ -324,7 +352,7 @@ func_extract_archives () {
cd $my_xdir || exit $? cd $my_xdir || exit $?
darwin_archive=$my_xabs darwin_archive=$my_xabs
darwin_curdir=`pwd` darwin_curdir=`pwd`
darwin_base_archive=`basename $darwin_archive` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
@ -333,64 +361,33 @@ func_extract_archives () {
for darwin_arch in $darwin_arches ; do for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
# Remove the table of contents from the thin files.
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
$AR -xo "${darwin_base_archive}" func_extract_an_archive "`pwd`" "${darwin_base_archive}"
rm "${darwin_base_archive}"
cd "$darwin_curdir" cd "$darwin_curdir"
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :) ## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
darwin_file= darwin_file=
darwin_files= darwin_files=
for darwin_file in $darwin_filelist; do for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist done # $darwin_filelist
rm -rf unfat-$$ ${rm}r unfat-$$
cd "$darwin_orig_dir" cd "$darwin_orig_dir"
else else
cd $darwin_orig_dir cd "$darwin_orig_dir"
(cd $my_xdir && $AR x $my_xabs) || exit $? func_extract_an_archive "$my_xdir" "$my_xabs"
fi # $darwin_arches fi # $darwin_arches
fi # $run fi # $run
;; ;;
*) *)
# We will extract separately just the conflicting names and we will func_extract_an_archive "$my_xdir" "$my_xabs"
# no longer touch any unique names. It is faster to leave these ;;
# extract automatically by $AR in one run.
$show "(cd $my_xdir && $AR x $my_xabs)"
$run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$my_xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
;;
esac esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done done
func_extract_archives_result="$my_oldobjs" func_extract_archives_result="$my_oldobjs"
} }
# End of Shell function definitions # End of Shell function definitions
@ -463,10 +460,10 @@ do
--version) --version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo $echo
$echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO" $echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $EXIT_SUCCESS exit $?
;; ;;
--config) --config)
@ -475,7 +472,7 @@ do
for tagname in $taglist; do for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done done
exit $EXIT_SUCCESS exit $?
;; ;;
--debug) --debug)
@ -500,7 +497,7 @@ do
else else
$echo "disable static libraries" $echo "disable static libraries"
fi fi
exit $EXIT_SUCCESS exit $?
;; ;;
--finish) mode="finish" ;; --finish) mode="finish" ;;
@ -557,7 +554,7 @@ if test -z "$show_help"; then
# Infer the operation mode. # Infer the operation mode.
if test -z "$mode"; then if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
case $nonopt in case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link mode=link
@ -674,7 +671,7 @@ if test -z "$show_help"; then
# Many Bourne shells cannot handle close brackets correctly # Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately. # in scan sets, so we specify it separately.
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -705,8 +702,11 @@ if test -z "$show_help"; then
case $lastarg in case $lastarg in
# Double-quote args containing other shell metacharacters. # Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly # Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately. # in scan sets, and some SunOS ksh mistreat backslash-escaping
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") # in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
lastarg="\"$lastarg\"" lastarg="\"$lastarg\""
;; ;;
esac esac
@ -779,6 +779,15 @@ if test -z "$show_help"; then
esac esac
done done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qlibobj="\"$qlibobj\"" ;;
esac
if test "X$libobj" != "X$qlibobj"; then
$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
exit $EXIT_FAILURE
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then if test "X$xdir" = "X$obj"; then
@ -851,12 +860,17 @@ compiler."
$run $rm $removelist $run $rm $removelist
exit $EXIT_FAILURE exit $EXIT_FAILURE
fi fi
$echo $srcfile > "$lockfile" $echo "$srcfile" > "$lockfile"
fi fi
if test -n "$fix_srcfile_path"; then if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\" eval srcfile=\"$fix_srcfile_path\"
fi fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T" $run $rm "$libobj" "${libobj}T"
@ -878,10 +892,10 @@ EOF
fbsd_hideous_sh_bug=$base_compile fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then if test "$pic_mode" != no; then
command="$base_compile $srcfile $pic_flag" command="$base_compile $qsrcfile $pic_flag"
else else
# Don't build PIC code # Don't build PIC code
command="$base_compile $srcfile" command="$base_compile $qsrcfile"
fi fi
if test ! -d "${xdir}$objdir"; then if test ! -d "${xdir}$objdir"; then
@ -961,9 +975,9 @@ EOF
if test "$build_old_libs" = yes; then if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then if test "$pic_mode" != yes; then
# Don't build PIC code # Don't build PIC code
command="$base_compile $srcfile" command="$base_compile $qsrcfile"
else else
command="$base_compile $srcfile $pic_flag" command="$base_compile $qsrcfile $pic_flag"
fi fi
if test "$compiler_c_o" = yes; then if test "$compiler_c_o" = yes; then
command="$command -o $obj" command="$command -o $obj"
@ -1141,7 +1155,7 @@ EOF
arg="$1" arg="$1"
shift shift
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;; ;;
*) qarg=$arg ;; *) qarg=$arg ;;
@ -1385,6 +1399,13 @@ EOF
prev= prev=
continue continue
;; ;;
darwin_framework)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
*) *)
eval "$prev=\"\$arg\"" eval "$prev=\"\$arg\""
prev= prev=
@ -1443,6 +1464,14 @@ EOF
continue continue
;; ;;
-framework)
prev=darwin_framework
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-inst-prefix-dir) -inst-prefix-dir)
prev=inst_prefix prev=inst_prefix
continue continue
@ -1503,7 +1532,7 @@ EOF
# These systems don't actually have a C library (as such) # These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
@ -1514,7 +1543,7 @@ EOF
esac esac
elif test "X$arg" = "X-lc_r"; then elif test "X$arg" = "X-lc_r"; then
case $host in case $host in
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag. # Do not include libc_r directly, use -pthread flag.
continue continue
;; ;;
@ -1524,8 +1553,20 @@ EOF
continue continue
;; ;;
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
-model)
compile_command="$compile_command $arg"
compiler_flags="$compiler_flags $arg"
finalize_command="$finalize_command $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
deplibs="$deplibs $arg" compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue continue
;; ;;
@ -1534,18 +1575,19 @@ EOF
continue continue
;; ;;
# gcc -m* arguments should be passed to the linker via $compiler_flags # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
# in order to pass architecture information to the linker # -r[0-9][0-9]* specifies the processor on the SGI compiler
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
# but this is not reliable with gcc because gcc may use -mfoo to # +DA*, +DD* enable 64-bit mode on the HP compiler
# select a different linker, different libraries, etc, while # -q* pass through compiler args for the IBM compiler
# -Wl,-mfoo simply passes -mfoo to the linker. # -m* pass through architecture-specific compiler args for GCC
-m*) -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
# Unknown arguments in both finalize_command and compile_command need # Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -1661,7 +1703,7 @@ EOF
for flag in $args; do for flag in $args; do
IFS="$save_ifs" IFS="$save_ifs"
case $flag in case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\"" flag="\"$flag\""
;; ;;
esac esac
@ -1679,7 +1721,7 @@ EOF
for flag in $args; do for flag in $args; do
IFS="$save_ifs" IFS="$save_ifs"
case $flag in case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
flag="\"$flag\"" flag="\"$flag\""
;; ;;
esac esac
@ -1717,7 +1759,7 @@ EOF
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -1851,7 +1893,7 @@ EOF
# to be aesthetically quoted because they are evaled later. # to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -2018,7 +2060,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs" compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs" finalize_deplibs="$deplib $finalize_deplibs"
else else
deplibs="$deplib $deplibs" compiler_flags="$compiler_flags $deplib"
fi fi
continue continue
;; ;;
@ -2027,10 +2069,6 @@ EOF
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue continue
fi fi
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $std_shrext .so .a; do for search_ext in .la $std_shrext .so .a; do
@ -2230,6 +2268,8 @@ EOF
# it will not redefine variables installed, or shouldnotlink # it will not redefine variables installed, or shouldnotlink
installed=yes installed=yes
shouldnotlink=no shouldnotlink=no
avoidtemprpath=
# Read the .la file # Read the .la file
case $lib in case $lib in
@ -2328,6 +2368,7 @@ EOF
dir="$libdir" dir="$libdir"
absdir="$libdir" absdir="$libdir"
fi fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
dir="$ladir" dir="$ladir"
@ -2412,7 +2453,7 @@ EOF
if test -n "$library_names" && if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path # We need to hardcode the library path
if test -n "$shlibpath_var"; then if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories. # Make sure the rpath contains only unique directories.
case "$temp_rpath " in case "$temp_rpath " in
*" $dir "*) ;; *" $dir "*) ;;
@ -2856,12 +2897,12 @@ EOF
*) continue ;; *) continue ;;
esac esac
case " $deplibs " in case " $deplibs " in
*" $depdepl "*) ;; *" $path "*) ;;
*) deplibs="$depdepl $deplibs" ;; *) deplibs="$path $deplibs" ;;
esac esac
case " $deplibs " in case " $deplibs " in
*" $path "*) ;; *" $depdepl "*) ;;
*) deplibs="$deplibs $path" ;; *) deplibs="$depdepl $deplibs" ;;
esac esac
done done
fi # link_all_deplibs != no fi # link_all_deplibs != no
@ -3126,27 +3167,27 @@ EOF
# Check that each of the things are valid numbers. # Check that each of the things are valid numbers.
case $current in case $current in
[0-9]*) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE exit $EXIT_FAILURE
;; ;;
esac esac
case $revision in case $revision in
[0-9]*) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE exit $EXIT_FAILURE
;; ;;
esac esac
case $age in case $age in
[0-9]*) ;; 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*) *)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE exit $EXIT_FAILURE
;; ;;
@ -3378,7 +3419,7 @@ EOF
*-*-netbsd*) *-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed. # Don't link with libc until the a.out ld.so is fixed.
;; ;;
*-*-openbsd* | *-*-freebsd*) *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
@ -3922,6 +3963,7 @@ EOF
save_libobjs=$libobjs save_libobjs=$libobjs
fi fi
save_output=$output save_output=$output
output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and # Clear the reloadable object creation command queue and
# initialize k to one. # initialize k to one.
@ -3931,7 +3973,7 @@ EOF
delfiles= delfiles=
last_robj= last_robj=
k=1 k=1
output=$output_objdir/$save_output-${k}.$objext output=$output_objdir/$output_la-${k}.$objext
# Loop over the list of objects to be linked. # Loop over the list of objects to be linked.
for obj in $save_libobjs for obj in $save_libobjs
do do
@ -3951,9 +3993,9 @@ EOF
# the last one created. # the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi fi
last_robj=$output_objdir/$save_output-${k}.$objext last_robj=$output_objdir/$output_la-${k}.$objext
k=`expr $k + 1` k=`expr $k + 1`
output=$output_objdir/$save_output-${k}.$objext output=$output_objdir/$output_la-${k}.$objext
objlist=$obj objlist=$obj
len=1 len=1
fi fi
@ -3973,13 +4015,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi fi
# Set up a command to remove the reloadale object files # Set up a command to remove the reloadable object files
# after they are used. # after they are used.
i=0 i=0
while test "$i" -lt "$k" while test "$i" -lt "$k"
do do
i=`expr $i + 1` i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
done done
$echo "creating a temporary reloadable object file: $output" $echo "creating a temporary reloadable object file: $output"
@ -4376,12 +4418,12 @@ extern \"C\" {
# Prepare the list of exported symbols # Prepare the list of exported symbols
if test -z "$export_symbols"; then if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp" export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols $run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else else
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"' $run eval 'mv "$nlist"T "$nlist"'
fi fi
fi fi
@ -4433,7 +4475,26 @@ extern \"C\" {
#endif #endif
/* The mapping between symbol names and symbols. */ /* The mapping between symbol names and symbols. */
"
case $host in
*cygwin* | *mingw* )
$echo >> "$output_objdir/$dlsyms" "\
/* DATA imports from DLLs on WIN32 can't be const, because
runtime relocations are performed -- see ld's documentation
on pseudo-relocs */
struct {
"
;;
* )
$echo >> "$output_objdir/$dlsyms" "\
const struct { const struct {
"
;;
esac
$echo >> "$output_objdir/$dlsyms" "\
const char *name; const char *name;
lt_ptr address; lt_ptr address;
} }
@ -4662,7 +4723,7 @@ static const void *lt_preloaded_setup() {
esac esac
case $host in case $host in
*cygwin* | *mingw* ) *cygwin* | *mingw* )
cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
cwrapper=`$echo ${output}.exe` cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper $rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@ -5082,6 +5143,63 @@ fi\
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds cmds=$old_archive_from_new_cmds
else else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\" eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` && if len=`expr "X$cmds" : ".*"` &&
@ -5095,20 +5213,7 @@ fi\
objlist= objlist=
concat_cmds= concat_cmds=
save_oldobjs=$oldobjs save_oldobjs=$oldobjs
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
# encoded into archives. This makes 'ar r' malfunction in
# this piecewise linking case whenever conflicting object
# names appear in distinct ar calls; check, warn and compensate.
if (for obj in $save_oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
# Is there a better way of finding the last object in the list? # Is there a better way of finding the last object in the list?
for obj in $save_oldobjs for obj in $save_oldobjs
do do
@ -5202,10 +5307,13 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE exit $EXIT_FAILURE
fi fi
if test "X$EGREP" = X ; then
EGREP=egrep
fi
# We do not want portage's install root ($D) present. Check only for # We do not want portage's install root ($D) present. Check only for
# this if the .la is being installed. # this if the .la is being installed.
if test "$installed" = yes && test "$D"; then if test "$installed" = yes && test "$D"; then
eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'` eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
else else
mynewdependency_lib="$libdir/$name" mynewdependency_lib="$libdir/$name"
fi fi
@ -5231,7 +5339,7 @@ fi\
# We do not want portage's install root ($D) present. # We do not want portage's install root ($D) present.
my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"` my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
elif test -n "$my_little_ninja_foo_3" && test "$D"; then elif test -n "$my_little_ninja_foo_3" && test "$D"; then
eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'` eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
else else
mynewdependency_lib="$deplib" mynewdependency_lib="$deplib"
fi fi
@ -5299,7 +5407,7 @@ fi\
esac esac
# Do not add duplicates # Do not add duplicates
if test "$installed" = yes && test "$D"; then if test "$installed" = yes && test "$D"; then
install_libdir=`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'` install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
fi fi
$echo > $output "\ $echo > $output "\
# $outputname - a libtool library file # $outputname - a libtool library file
@ -5365,7 +5473,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it. # Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -5381,7 +5489,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it. # Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -5429,7 +5537,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument. # Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
arg="\"$arg\"" arg="\"$arg\""
;; ;;
esac esac
@ -6468,7 +6576,7 @@ esac
$echo $echo
$echo "Try \`$modename --help' for more information about other modes." $echo "Try \`$modename --help' for more information about other modes."
exit $EXIT_SUCCESS exit $?
# The TAGs below are defined such that we never get into a situation # The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting # in which we disable both kinds of libraries. Given conflicting

16
missing
View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2004-09-07.08 scriptversion=2005-02-08.22
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@ -87,12 +87,12 @@ Supported PROGRAM values:
yacc create \`y.tab.[ch]', if possible, from existing .[ch] yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>." Send bug reports to <bug-automake@gnu.org>."
exit 0 exit $?
;; ;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)" echo "missing $scriptversion (GNU Automake)"
exit 0 exit $?
;; ;;
-*) -*)
@ -288,10 +288,14 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX, call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site." the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` # ... or it is the one specified with @setfilename ...
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi fi
touch $file touch $file
;; ;;

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am. # Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 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.

View File

@ -26,7 +26,7 @@ static struct scan_ports port_arr[] = {
{ 23000, 23010, 35 }, /* bfv(35) */ { 23000, 23010, 35 }, /* bfv(35) */
{ 26001, 26011, 19 }, /* igi2(19) */ { 26001, 26011, 19 }, /* igi2(19) */
{ 27888, 27888, 17 }, /* avp2(17) (nur der standart-port..) */ { 27888, 27888, 17 }, /* avp2(17) (nur der standart-port..) */
{ 0, 0, 0 } { 0, 0, 0 }
}; };
struct gs1_part { struct gs1_part {

View File

@ -21,9 +21,10 @@
#include "plugin_helper.h" #include "plugin_helper.h"
static struct scan_ports port_arr[] = { static struct scan_ports port_arr[] = {
{ 2302, 2302, 30 }, /* halo(30) */ { 2302, 2302, 30 }, /* halo(30) */
{ 3455, 3455, 37 }, /* painkiller(34) */ { 3455, 3455, 37 }, /* painkiller(34) */
{ 0,0,0 } { 29900, 29910, 45 }, /* battlefield2 (45) */
{ 0, 0, 0 }
}; };
static char scanmsg[] = { 0xFE, 0xFD, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00, 0x00, 0x00 }; static char scanmsg[] = { 0xFE, 0xFD, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00, 0x00, 0x00 };

View File

@ -35,11 +35,13 @@ static struct scan_ports port_arr[] = {
static char scanmsg1[] = "\xff\xff\xff\xff" "details"; static char scanmsg1[] = "\xff\xff\xff\xff" "details";
static char scanmsg2[] = "\xff\xff\xff\xff\x54"; static char scanmsg2[] = "\xff\xff\xff\xff\x54";
static char scanmsg3[] = "\xff\xff\xff\xff" "TSource Engine Query";
static int scan(void) static int scan(void)
{ {
pkt_send_portarr(NULL, port_arr, scanmsg1, strlen(scanmsg1)); pkt_send_portarr(NULL, port_arr, scanmsg1, strlen(scanmsg1));
pkt_send_portarr(NULL, port_arr, scanmsg2, strlen(scanmsg2)); pkt_send_portarr(NULL, port_arr, scanmsg2, strlen(scanmsg2));
pkt_send_portarr(NULL, port_arr, scanmsg3, strlen(scanmsg3));
return 1; return 1;
} }

View File

@ -23,14 +23,15 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/ip.h> #include <netinet/ip.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <inttypes.h>
#include "plugin_helper.h" #include "plugin_helper.h"
struct hlsw_entry { struct hlsw_entry {
u_int16_t gameid; uint16_t gameid;
u_int32_t ip; uint32_t ip;
u_int16_t port1; uint16_t port1;
u_int16_t port2; uint16_t port2;
} __attribute__ ((packed)); } __attribute__ ((packed));
static struct in_addr *ip_arr = NULL; static struct in_addr *ip_arr = NULL;

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am. # Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 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.

View File

@ -29,6 +29,7 @@
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <time.h> #include <time.h>
#include <inttypes.h>
#include "list.h" #include "list.h"
#include "netpkt.h" #include "netpkt.h"
@ -87,7 +88,7 @@ static inline int server_cmp(const struct game_server *a, struct game_server *b)
* @param port2 zweiter port * @param port2 zweiter port
* @return false bei fehler * @return false bei fehler
*/ */
int server_add(u_int16_t gameid, u_int32_t ip, u_int16_t port1, u_int16_t port2) int server_add(uint16_t gameid, uint32_t ip, uint16_t port1, uint16_t port2)
{ {
struct game_server server, *nserver; struct game_server server, *nserver;

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am. # Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc. # 2003, 2004, 2005 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.

View File

@ -10,12 +10,13 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/ip.h> #include <netinet/ip.h>
#include <inttypes.h>
struct _entry { struct _entry {
u_int16_t gameid; uint16_t gameid;
u_int32_t ip; uint32_t ip;
u_int16_t port1; uint16_t port1;
u_int16_t port2; uint16_t port2;
} __attribute__ ((packed)); } __attribute__ ((packed));
static char hlswheader[] = "\xFF\xFF\xFF\xFFHLSWLANSEARCH"; static char hlswheader[] = "\xFF\xFF\xFF\xFFHLSWLANSEARCH";
@ -26,7 +27,7 @@ static char *id2name[] = {
"Quake 1", "Quake 1",
"Quake 2", "Quake 2",
"Q3Comp", "Q3Comp",
"Unreal Tournament", "Unreal Tournament", // 5
"Quake 3 Arena", "Quake 3 Arena",
"Elite Force", "Elite Force",
"Return to Castle Wolfenstein", "Return to Castle Wolfenstein",
@ -36,7 +37,7 @@ static char *id2name[] = {
"Jedi Knight 2", "Jedi Knight 2",
"Soldier of Fortune", "Soldier of Fortune",
"Unreal Tournament 2003", "Unreal Tournament 2003",
"America's Army: Operations", "America's Army: Operations", // 15
"Battlefield 1942", "Battlefield 1942",
"Alien vs. Predator 2", "Alien vs. Predator 2",
"Rune", "Rune",
@ -46,7 +47,7 @@ static char *id2name[] = {
"Operation Flashpoint", "Operation Flashpoint",
"Operation Flashpoint Resistance", "Operation Flashpoint Resistance",
"Devastation", "Devastation",
"Wolfenstein - Enemy Territory", "Wolfenstein - Enemy Territory", //25
"Elite Force 2", "Elite Force 2",
"Jedi Knight 3", "Jedi Knight 3",
"Medal of Honor: Allied Assault Breakthrough", "Medal of Honor: Allied Assault Breakthrough",
@ -56,14 +57,17 @@ static char *id2name[] = {
"Savage: The Battle for Newerth", "Savage: The Battle for Newerth",
"Unreal Tournament 2004", "Unreal Tournament 2004",
"HLSteam", "HLSteam",
"Battlefield Vietnam", "Battlefield Vietnam", // 35
"GS2Prot", "GS2Prot",
"Pain Killer", "Pain Killer",
"Doom 3", "Doom 3",
"OGPProt", "OGPProt",
"Halflife 2", // 40 "Halflife 2", // 40
"Tribes Vengeance", "Tribes Vengeance",
"Call of Duty: United Offensive" "Call of Duty: United Offensive",
"Starwars: Battlefront (?)",
"SWAT 4 (?)",
"Battlefield 2" // 45
}; };
static int sock, verbose = 0; static int sock, verbose = 0;