From bd6496191222fab41b364dfcad54ec52a753be7d Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 12 Feb 2010 00:03:44 +0000 Subject: Improve support for NetBSD git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12438 e03df62e-2008-0410-955e-edbf42e46eb7 --- configure | 2 +- make/calcdep.pl | 2 +- make/run-cc.pl | 2 +- make/template/inspircd | 12 ++++++------ make/unit-cc.pl | 2 +- modulemanager | 2 +- src/inspircd.cpp | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/configure b/configure index c5e87b4bc..3f684df8a 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl ################################################### # InspIRCd Configuration Script # diff --git a/make/calcdep.pl b/make/calcdep.pl index 55e0630fc..2ae03cc36 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; use POSIX qw(getcwd); diff --git a/make/run-cc.pl b/make/run-cc.pl index d5c62333c..4c3ccbb41 100755 --- a/make/run-cc.pl +++ b/make/run-cc.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # +------------------------------------+ # | Inspire Internet Relay Chat Daemon | diff --git a/make/template/inspircd b/make/template/inspircd index 92f3f3bac..ed8411083 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # +------------------------------------+ # | Inspire Internet Relay Chat Daemon | # +------------------------------------+ @@ -170,7 +170,7 @@ sub dev_debug(@) checkgdb(); # If we are still alive here.. Try starting the IRCd.. - exec 'gdb', "--command=$basepath/.gdbargs", '--args', "$binpath/$executable", qw(-nofork -debug), @_; + exec 'gdb', "--command=$basepath/.gdbargs", '--args', "$binpath/$executable", qw(--nofork --debug), @_; die "Failed to start GDB: $!\n"; } @@ -189,7 +189,7 @@ sub dev_screendebug(@) # If we are still alive here.. Try starting the IRCd.. print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the gdb output and get a backtrace.\n"; print "Once you're inside the screen session press ^C + d to re-detach from the session\n"; - exec qw(screen -m -d gdb), "--comand=$basepath/.gdbargs", '-args', "$binpath/$executable", qw(-nofork -debug -nolog), @_; + exec qw(screen -m -d gdb), "--comand=$basepath/.gdbargs", '-args', "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start screen: $!\n"; } @@ -209,7 +209,7 @@ sub dev_valdebug(@) # If we are still alive here.. Try starting the IRCd.. # May want to do something with these args at some point: --suppressions=.inspircd.sup --gen-suppressions=yes # Could be useful when we want to stop it complaining about things we're sure aren't issues. - exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(-nofork -debug -nolog), @_; + exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start valgrind: $!\n"; } @@ -246,7 +246,7 @@ sub dev_valdebug_unattended(@) exec qw(valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=15 --track-fds=yes), "--suppressions=$binpath/valgrind.sup", qw(--gen-suppressions=all), qw(--leak-resolution=med --time-stamp=yes --log-fd=2 --), - "$binpath/$executable", qw(-nofork -debug -nolog), @_; + "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Can't execute valgrind: $!\n"; } } @@ -268,7 +268,7 @@ sub dev_screenvaldebug(@) # If we are still alive here.. Try starting the IRCd.. print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the valgrind and gdb output and get a backtrace.\n"; print "Once you're inside the screen session press ^C + d to re-detach from the session\n"; - exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(-nofork -debug -nolog), @_; + exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start screen: $!\n"; } diff --git a/make/unit-cc.pl b/make/unit-cc.pl index 489b46ff9..e64053b66 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; BEGIN { push @INC, $ENV{SOURCEPATH}; } diff --git a/modulemanager b/modulemanager index 0e978977a..8b7108123 100755 --- a/modulemanager +++ b/modulemanager @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings FATAL => qw(all); use LWP::Simple; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index b95a6fecb..58015b718 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -392,7 +392,7 @@ InspIRCd::InspIRCd(int argc, char** argv) : }; int index; - while ((c = getopt_long_only(argc, argv, ":f:", longopts, &index)) != -1) + while ((c = getopt_long(argc, argv, ":f:", longopts, &index)) != -1) { switch (c) { -- cgit v1.2.3