* Respect CC/CFLAGS/CXX/CXXFLAGS.
* C++ fix for gcc3; from Craig Rodrigues <rodrigc@attbi.com> via FreeBSD. ok jakob@
This commit is contained in:
parent
36a9392a98
commit
8e4fd4868f
@ -1,10 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2002/01/11 07:22:04 jakob Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2002/10/04 19:20:24 naddy Exp $
|
||||
|
||||
COMMENT= "tool for measuring maximum TCP and UDP bandwidth"
|
||||
|
||||
DISTNAME= iperf-1.2
|
||||
CATEGORIES= net
|
||||
NEED_VERSION= 1.500
|
||||
|
||||
HOMEPAGE= http://dast.nlanr.net/Projects/Iperf/
|
||||
|
||||
@ -17,6 +16,8 @@ PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= http://dast.nlanr.net/Projects/Iperf/
|
||||
|
||||
MAKE_ENV= CC="${CC}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKBUILD}/iperf ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/iperf
|
||||
|
@ -1,24 +1,59 @@
|
||||
$OpenBSD: patch-cfg_configure,v 1.1.1.1 2001/04/16 21:33:10 jakob Exp $
|
||||
|
||||
--- cfg/configure.orig Fri Feb 18 21:45:03 2000
|
||||
+++ cfg/configure Mon Apr 16 23:22:01 2001
|
||||
@@ -581,6 +581,7 @@ fi
|
||||
$OpenBSD: patch-cfg_configure,v 1.2 2002/10/04 19:20:24 naddy Exp $
|
||||
--- cfg/configure.orig Mon Feb 12 17:40:04 2001
|
||||
+++ cfg/configure Wed Oct 2 00:42:49 2002
|
||||
@@ -584,6 +584,7 @@ fi
|
||||
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
|
||||
+ac_cv_prog_CC=gcc
|
||||
+ac_cv_prog_CC=${CC-cc}
|
||||
if test -n "$ac_cv_prog_CC"; then
|
||||
echo "Using cached C compiler $ac_cv_prog_CC"
|
||||
echo "To change compilers, use \"make distclean\" then rerun configure"
|
||||
@@ -793,6 +794,7 @@ fi
|
||||
@@ -831,23 +832,12 @@ fi
|
||||
|
||||
|
||||
|
||||
-if test "$ac_cv_prog_gcc" = yes ; then
|
||||
- CFLAGS="$OLD_CFLAGS -Wall -O2"
|
||||
-else
|
||||
- if test `uname -s` = "HP-UX"; then
|
||||
- CFLAGS="$OLD_CFLAGS -Ae +O2"
|
||||
- elif test `uname -s` = "SunOS"; then
|
||||
- CFLAGS="$OLD_CFLAGS -xO2"
|
||||
- else
|
||||
- CFLAGS="$OLD_CFLAGS -O2"
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
|
||||
|
||||
|
||||
OLD_CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
+ac_cv_prog_CXX=g++
|
||||
+ac_cv_prog_CXX=${CXX-c++}
|
||||
if test -n "$ac_cv_prog_CXX"; then
|
||||
echo "Using cached C++ compiler $ac_cv_prog_CXX"
|
||||
echo "To change compilers, use \"make distclean\" then rerun configure"
|
||||
@@ -998,14 +1000,7 @@ fi
|
||||
@@ -1016,18 +1006,6 @@ fi
|
||||
|
||||
|
||||
|
||||
-if test "$ac_cv_prog_gcc" = yes ; then
|
||||
- CXXFLAGS="$OLD_CXXFLAGS -Wall -O2"
|
||||
-else
|
||||
- if test `uname -s` = "HP-UX"; then
|
||||
- CXXFLAGS="$OLD_CXXFLAGS -Ae +O2"
|
||||
- elif test `uname -s` = "SunOS"; then
|
||||
- CXXFLAGS="$OLD_CXXFLAGS -xO2"
|
||||
- else
|
||||
- CXXFLAGS="$OLD_CXXFLAGS -O2"
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
|
||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||
set dummy ranlib; ac_word=$2
|
||||
@@ -1065,14 +1043,7 @@ fi
|
||||
echo
|
||||
|
||||
|
||||
|
14
net/iperf/patches/patch-src_Listener_cpp
Normal file
14
net/iperf/patches/patch-src_Listener_cpp
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-src_Listener_cpp,v 1.1 2002/10/04 19:20:24 naddy Exp $
|
||||
--- src/Listener.cpp.orig Wed Oct 2 00:20:14 2002
|
||||
+++ src/Listener.cpp Wed Oct 2 00:22:19 2002
|
||||
@@ -213,8 +213,8 @@ void Listener::runAsDaemon(const char *p
|
||||
fflush(stdout);
|
||||
/*umask(0);*/
|
||||
|
||||
- close((int)stdout);
|
||||
- close((int)stdin);
|
||||
+ close(fileno(stdout));
|
||||
+ close(fileno(stdin));
|
||||
openlog(pname,LOG_CONS,facility);
|
||||
#else
|
||||
printf("Windows daemon not supported currently\n");
|
20
net/iperf/patches/patch-src_PerfSocket_UDP_cpp
Normal file
20
net/iperf/patches/patch-src_PerfSocket_UDP_cpp
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-src_PerfSocket_UDP_cpp,v 1.1 2002/10/04 19:20:24 naddy Exp $
|
||||
--- src/PerfSocket_UDP.cpp.orig Wed Oct 2 00:12:24 2002
|
||||
+++ src/PerfSocket_UDP.cpp Wed Oct 2 00:14:06 2002
|
||||
@@ -375,11 +375,13 @@ void PerfSocket::Multicast_remove_client
|
||||
|
||||
extern vector<sockaddr_in> clients;
|
||||
|
||||
- for (int i=0; i < (int)(clients).size(); i++) {
|
||||
- sockaddr_in t1 = clients[i];
|
||||
+ vector<sockaddr_in>::iterator iter = clients.begin();
|
||||
+
|
||||
+ for (; iter != clients.end(); iter++) {
|
||||
+ sockaddr_in t1 = *iter;
|
||||
if ( ((long) t1.sin_addr.s_addr == (long) peer.sin_addr.s_addr)
|
||||
&& ( t1.sin_port == peer.sin_port)) {
|
||||
- (clients).erase(&(clients[i]));
|
||||
+ clients.erase(iter);
|
||||
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue
Block a user