Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 2006 23:01:14 +0200 (CEST)
From:      Gerhard Gonter <g.gonter@ieee.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Gerhard Gonter <g.gonter@ieee.org>
Subject:   ports/100833: [new port] sysutils/xdd
Message-ID:  <200607252101.k6PL1EH5042826@w4.urxn.at>
Resent-Message-ID: <200607252110.k6PLAE39006973@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         100833
>Category:       ports
>Synopsis:       [new port] sysutils/xdd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 25 21:10:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Gerhard Gonter
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
none
>Environment:
System: FreeBSD w4.urxn.at 5.4-STABLE FreeBSD 5.4-STABLE #0: Fri Sep 30 17:05:51 UTC 2005 root@root38.world4you.com:/usr/obj/usr/src/sys/GENERIC i386


>Description:

	New port of a tool to measure disk subsystem I/O performance.

	The patches wer submitted to the author of the xdd software
	about two months ago, but there is no new tar yet, so I
	submit the patches as part of the port.

>How-To-Repeat:

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	xdd
#	xdd/Makefile
#	xdd/distinfo
#	xdd/files
#	xdd/files/freebsd.makefile
#	xdd/files/patch-global_time.c
#	xdd/files/patch-initialization.c
#	xdd/files/patch-misc.h
#	xdd/files/patch-ticker.c
#	xdd/files/patch-ticker.h
#	xdd/files/patch-timeserver.c
#	xdd/files/patch-xdd.c
#	xdd/files/patch-xdd.h
#	xdd/files/patch-parse.c
#	xdd/pkg-descr
#
echo c - xdd
mkdir -p xdd > /dev/null 2>&1
echo x - xdd/Makefile
sed 's/^X//' >xdd/Makefile << 'END-of-xdd/Makefile'
X# New ports collection makefile for:	sysutils/xdd
X# Date created:				29.05.2006
X# Whom:					Gerhard Gonter <g.gonter@ieee.org>
X#
X# $FreeBSD: $
X#
X
XPORTNAME=	xdd
XPORTVERSION=	64
XCATEGORIES=	sysutils
XMASTER_SITES=	http://www.ioperformance.com/xddversions/
XDISTFILES=	xdd64.121805.tar.gz
X
XMAINTAINER=	g.gonter@ieee.org
XCOMMENT=	tool for measuring and characterizing disk subsystem I/O
X
X.include <bsd.port.pre.mk>
X
XWRKSRC=          ${WRKDIR}/${PORTNAME}${PORTVERSION}
XPLIST_FILES=	 bin/xdd bin/timeserver bin/gettime
X
Xpost-extract:
X		cp ${FILESDIR}/freebsd.makefile ${WRKSRC}
X
Xdo-build:
X		cd ${WRKSRC} && make -f freebsd.makefile
X
Xdo-install:
X		${INSTALL_PROGRAM} ${WRKSRC}/bin/xdd.freebsd ${PREFIX}/bin/xdd
X		${INSTALL_PROGRAM} ${WRKSRC}/bin/timeserver.freebsd ${PREFIX}/bin/timeserver
X		${INSTALL_PROGRAM} ${WRKSRC}/bin/gettime.freebsd ${PREFIX}/bin/gettime
X
X.include <bsd.port.post.mk>
END-of-xdd/Makefile
echo x - xdd/distinfo
sed 's/^X//' >xdd/distinfo << 'END-of-xdd/distinfo'
XMD5 (xdd64.121805.tar.gz) = 10cc5daeddb3853833f88d20cf6fda3e
XSIZE (xdd64.121805.tar.gz) = 1985205
XSHA256 (xdd64.121805.tar.gz) = cfa60804145bec2066b494cb47d734ae3d50a4d0344bd1cc5277214cada804df
END-of-xdd/distinfo
echo c - xdd/files
mkdir -p xdd/files > /dev/null 2>&1
echo x - xdd/files/freebsd.makefile
sed 's/^X//' >xdd/files/freebsd.makefile << 'END-of-xdd/files/freebsd.makefile'
X# XDD Makefile for FreeBSD
XSHELL =		/bin/sh
XCFLAGS =	-O2 -DFreeBSD -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g 
XPROJECT =	xdd
XOBJECTS =	xdd.o access_pattern.o barrier.o global_time.o initialization.o parse.o pclk.o read_after_write.o results.o ticker.o time_stamp.o
XHEADERS = 	xdd.h pclk.h ticker.h misc.h 
XTSOBJECTS =	timeserver.o pclk.o ticker.o
XGTOBJECTS = gettime.o global_time.o pclk.o ticker.o
X
Xall:	xdd timeserver gettime
X
Xxdd:	$(OBJECTS) 
X	gcc  -o xdd $(CFLAGS) $(OBJECTS) -lpthread -v
X	mv -f xdd bin/xdd.freebsd
X
Xtimeserver:	$(TSOBJECTS) 
X	gcc  -o timeserver $(CFLAGS) $(TSOBJECTS) -lpthread -v
X	mv -f timeserver bin/timeserver.freebsd
X
Xgettime:	$(GTOBJECTS) 
X	gcc  -o gettime $(CFLAGS) $(GTOBJECTS) -lpthread -v
X	mv -f gettime bin/gettime.freebsd
X
Xaccess_pattern.o:	access_pattern.c
X	gcc  $(CFLAGS) -c access_pattern.c
X
Xbarrier.o:	barrier.c
X	gcc  $(CFLAGS) -c barrier.c
X
Xgettime.o: gettime.c
X	gcc $(CFLAGS) -c gettime.c
X
Xglobal_time.o:	global_time.c
X	gcc  $(CFLAGS) -c global_time.c
X
Xinitialization.o:	initialization.c
X	gcc  $(CFLAGS) -c initialization.c
X
Xparse.o:	parse.c
X	gcc  $(CFLAGS) -c parse.c
X
Xpclk.o:	pclk.c 
X	gcc  $(CFLAGS) -c pclk.c
X
Xread_after_write.o:	read_after_write.c
X	gcc  $(CFLAGS) -c read_after_write.c
X
Xresults.o:	results.c
X	gcc  $(CFLAGS) -c results.c
X
Xticker.o:	ticker.c
X	gcc  $(CFLAGS) -c ticker.c
X
Xtime_stamp.o:	time_stamp.c
X	gcc  $(CFLAGS) -c time_stamp.c
X
Xtimeserver.o: timeserver.c
X	gcc $(CFLAGS) -c timeserver.c
X
Xxdd.o:  xdd.c 
X	gcc  $(CFLAGS) -c xdd.c
X
Xdist:	clean
X	tar cf ../dist.tar .
Xclean:
X	-rm -f xdd timeserver gettime a.out $(OBJECTS) $(TSOBJECTS) $(GTOBJECTS)
X
X
END-of-xdd/files/freebsd.makefile
echo x - xdd/files/patch-global_time.c
sed 's/^X//' >xdd/files/patch-global_time.c << 'END-of-xdd/files/patch-global_time.c'
X--- global_time.c.orig	Mon May 29 04:12:29 2006
X+++ global_time.c	Mon May 29 04:16:36 2006
X@@ -42,11 +42,15 @@
X #else /* GENERIC_UNIX */
X #include <netdb.h>
X #include <sys/socket.h>
X+#if (FreeBSD)
X+#include <sys/types.h>
X+#include <sys/unistd.h>
X+#endif /* (FreeBSD) */
X #include <netinet/in.h>
X #include <netinet/tcp.h>
X #include <arpa/inet.h>
X #endif
X-#if (AIX || HPUX || SOLARIS)
X+#if (AIX || HPUX || SOLARIS || FreeBSD)
X #include <stdarg.h>
X #endif
X #include "xdd.h"
END-of-xdd/files/patch-global_time.c
echo x - xdd/files/patch-initialization.c
sed 's/^X//' >xdd/files/patch-initialization.c << 'END-of-xdd/files/patch-initialization.c'
X--- initialization.c.orig	Mon May 29 04:17:28 2006
X+++ initialization.c	Mon May 29 04:18:32 2006
X@@ -562,7 +562,7 @@
X 	 * NOTE: This is not supported by all operating systems. 
X 	 */
X 	if (p->target_options & RX_SHARED_MEMORY) {
X-#if (AIX || LINUX || SOLARIS || OSX)
X+#if (AIX || LINUX || SOLARIS || OSX || FreeBSD)
X 		/* In AIX we need to get memory in a shared memory segment to avoid
X 	     * the system continually trying to pin each page on every I/O operation */
X #if (AIX)
X@@ -590,14 +590,14 @@
X 		fprintf(xgp->errout,"%s: Shared Memory not supported on this OS - using valloc\n",
X 			xgp->progname);
X 		p->target_options &= ~RX_SHARED_MEMORY;
X-#if (IRIX || SOLARIS || HPUX || LINUX || AIX || ALTIX || OSX)
X+#if (IRIX || SOLARIS || HPUX || LINUX || AIX || ALTIX || OSX || FreeBSD)
X 		rwbuf = valloc(p->iosize);
X #else
X 		rwbuf = malloc(p->iosize);
X #endif
X #endif 
X 	} else { /* Allocate memory the normal way */
X-#if (IRIX || SOLARIS || HPUX || LINUX || AIX || ALTIX || OSX)
X+#if (IRIX || SOLARIS || HPUX || LINUX || AIX || ALTIX || OSX || FreeBSD)
X 		rwbuf = valloc(p->iosize);
X #else
X 		rwbuf = malloc(p->iosize);
X@@ -684,7 +684,7 @@
X 	newlim = liret - (PAGESIZE*8);
X 	return;
X #else
X-#if  (LINUX || SOLARIS || HPUX || OSX || AIX)
X+#if  (LINUX || SOLARIS || HPUX || OSX || AIX || FreeBSD)
X 	if (getuid() != 0) {
X 		fprintf(xgp->errout,"(PID %d) %s: You must run as superuser to lock memory for %s\n",
X 			getpid(),xgp->progname, sp);
X@@ -833,7 +833,7 @@
X #endif
X 	return;
X #else
X-#if (IRIX || SOLARIS || HPUX || LINUX || ALTIX || OSX)
X+#if (IRIX || SOLARIS || HPUX || LINUX || ALTIX || OSX || FreeBSD)
X 	if (getuid() != 0) {
X 		return;
X 	}
X@@ -919,7 +919,7 @@
X                 return;
X 
X #if !(OSX)
X-#if (IRIX || SOLARIS || HPUX || AIX || LINUX || ALTIX || OSX)
X+#if (IRIX || SOLARIS || HPUX || AIX || LINUX || ALTIX || OSX || FreeBSD)
X 	if (getuid() != 0)
X 		fprintf(xgp->errout,"%s: xdd_schedule_options: You must be super user to lock processes\n",xgp->progname);
X #endif 
X@@ -933,7 +933,7 @@
X 
X         /* reset priority */
X 	if (xgp->global_options & RX_MAXPRI) {
X-#if (IRIX || SOLARIS || HPUX || AIX || LINUX || ALTIX || OSX)
X+#if (IRIX || SOLARIS || HPUX || AIX || LINUX || ALTIX || OSX || FreeBSD)
X 		if (getuid() != 0) 
X 			fprintf(xgp->errout,"%s: xdd_schedule_options: You must be super user to max priority\n",xgp->progname);
X #endif
X@@ -1063,7 +1063,7 @@
X #endif
X #if (IRIX || SOLARIS || HPUX || AIX || ALTIX)
X 	struct stat64 statbuf; /* buffer for file statistics */
X-#elif ( LINUX || OSX )
X+#elif ( LINUX || OSX || FreeBSD )
X 	struct stat statbuf; /* buffer for file statistics */
X #endif
X 	int32_t  i; /* working variable */
END-of-xdd/files/patch-initialization.c
echo x - xdd/files/patch-misc.h
sed 's/^X//' >xdd/files/patch-misc.h << 'END-of-xdd/files/patch-misc.h'
X--- misc.h.orig	Mon May 29 04:04:19 2006
X+++ misc.h	Mon May 29 04:12:05 2006
X@@ -35,7 +35,7 @@
X /* -------- */
X /* Includes */
X /* -------- */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X #ifndef NDEBUG /* These are only needed if Assert() expands to something */
X #include <stdio.h> /* fprintf(), stderr */
X #include <unistd.h> /* pause() */
X@@ -60,7 +60,7 @@
X /* --------- */
X /* Constants */
X /* --------- */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X #define MILLION  1000000LL /* 10^6, as opposed to 2^20 */
X #define BILLION  1000000000LL /* 10^9, as opposed to 2^30 */
X #define TRILLION 1000000000000LL /* 10^12, as opposed to 2^40 */
X@@ -77,7 +77,7 @@
X #ifndef LLONG_MIN
X #define LLONG_MIN (-LLONG_MAX - 1LL)
X #endif
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X #ifndef LONGLONG_MIN
X #define LONGLONG_MIN LLONG_MIN
X #endif
END-of-xdd/files/patch-misc.h
echo x - xdd/files/patch-ticker.c
sed 's/^X//' >xdd/files/patch-ticker.c << 'END-of-xdd/files/patch-ticker.c'
X--- ticker.c.orig	Mon May 29 04:23:53 2006
X+++ ticker.c	Mon May 29 04:24:15 2006
X@@ -76,7 +76,7 @@
X     return;
X }
X /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
X-#elif (LINUX || SOLARIS || AIX || HPUX || OSX)
X+#elif (LINUX || SOLARIS || AIX || HPUX || OSX || FreeBSD)
X void
X ticker_open(tick_t *tickp) {
X     uint32_t picos;
X@@ -161,7 +161,7 @@
X     return; /* Ticker not open, or error reading ticker */
X }
X /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
X-#elif (LINUX || SOLARIS || AIX || HPUX || OSX)
X+#elif (LINUX || SOLARIS || AIX || HPUX || OSX || FreeBSD)
X void
X ticker_read(tick_t *tickp) {
X     struct timeval current_time;
X@@ -198,7 +198,7 @@
X  *
X  * Close the ticker.
X  */
X-#if (WIN32 || LINUX || SOLARIS || AIX || HPUX || OSX)
X+#if (WIN32 || LINUX || SOLARIS || AIX || HPUX || OSX || FreeBSD)
X void
X ticker_close(void) {
X     ticker_period = 0;
END-of-xdd/files/patch-ticker.c
echo x - xdd/files/patch-ticker.h
sed 's/^X//' >xdd/files/patch-ticker.h << 'END-of-xdd/files/patch-ticker.h'
X--- ticker.h.orig	Mon May 29 04:02:17 2006
X+++ ticker.h	Mon May 29 04:02:33 2006
X@@ -35,7 +35,7 @@
X /* Types */
X /* ----- */
X /* A ticker value */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X typedef unsigned long long tick_t;
X #else
X typedef unsigned __int64  tick_t;
END-of-xdd/files/patch-ticker.h
echo x - xdd/files/patch-timeserver.c
sed 's/^X//' >xdd/files/patch-timeserver.c << 'END-of-xdd/files/patch-timeserver.c'
X--- timeserver.c.orig	Mon May 29 04:25:26 2006
X+++ timeserver.c	Mon May 29 04:25:56 2006
X@@ -29,9 +29,9 @@
X #include <stdarg.h> /* variable arguments stuff */
X #include <string.h> /* strrchr(), strerror() */
X #include <errno.h> /* errno stuff */
X-#if (IRIX || SOLARIS || AIX || HPUX || LINUX || OSX)
X+#if (IRIX || SOLARIS || AIX || HPUX || LINUX || OSX || FreeBSD)
X #include <unistd.h>
X-#if !(SOLARIS || AIX || HPUX || LINUX || OSX)
X+#if !(SOLARIS || AIX || HPUX || LINUX || OSX || FreeBSD)
X #include <bstring.h>
X #endif
X #include <limits.h> /* USHRT_MAX */
X@@ -57,7 +57,7 @@
X /* ----- */
X /* Types */
X /* ----- */
X-#if !(IRIX || SOLARIS || AIX || HPUX || LINUX || OSX)
X+#if !(IRIX || SOLARIS || AIX || HPUX || LINUX || OSX || FreeBSD)
X /* SGI defines these in <netinet/in.h> */
X typedef unsigned long in_addr_t; /* An IP number */
X typedef unsigned short in_port_t; /* A port number */
X@@ -231,7 +231,7 @@
X #if (AIX)
X     nd = sd + 1;
X #endif
X-#if (SOLARIS || HPUX || OSX)
X+#if (SOLARIS || HPUX || OSX || FreeBSD)
X 	nd = FD_SETSIZE;
X #endif
X     for (;;) {
END-of-xdd/files/patch-timeserver.c
echo x - xdd/files/patch-xdd.c
sed 's/^X//' >xdd/files/patch-xdd.c << 'END-of-xdd/files/patch-xdd.c'
X--- xdd.c.orig	Mon May 29 04:06:49 2006
X+++ xdd.c	Mon May 29 04:24:54 2006
X@@ -60,7 +60,7 @@
X 	/* Things used by the read-after-write operations */
X #if (IRIX || SOLARIS || HPUX || AIX || ALTIX)
X 	struct stat64 statbuf;
X-#elif (LINUX || OSX)
X+#elif (LINUX || OSX || FreeBSD)
X     struct  stat    statbuf;
X #endif
X 	int64_t prev_loc; /* The previous location from a read-after-write message from the writer */
X@@ -114,11 +114,11 @@
X 		sleep_time_dw = (int32_t)(p->start_delay/BILLION);
X #ifdef WIN32
X 		Sleep(sleep_time_dw);
X-#elif (LINUX || IRIX || AIX || ALTIX || OSX) /* Add OS Support to this line for usleep() */
X+#elif (LINUX || IRIX || AIX || ALTIX || OSX || FreeBSD) /* Add OS Support to this line for usleep() */
X 		if ((sleep_time_dw*CLK_TCK) > 1000) /* only sleep if it will be 1 or more ticks */
X #if (IRIX || ALTIX)
X 			sginap((sleep_time_dw*CLK_TCK)/1000);
X-#elif (LINUX || AIX || OSX) /* Add OS Support to this line for usleep() as well*/
X+#elif (LINUX || AIX || OSX || FreeBSD) /* Add OS Support to this line for usleep() as well*/
X 			usleep(sleep_time_dw*1000);
X #endif
X #endif
X@@ -384,14 +384,14 @@
X 				p->my_current_byte_location = (uint64_t)((p->mynum * xgp->target_offset) + p->seekhdr.seeks[0].block_location) * p->block_size;
X 		else    p->my_current_byte_location = (uint64_t)((p->mynum * xgp->target_offset) + p->seekhdr.seeks[current_op].block_location) * p->block_size;
X 
X-#if (LINUX || IRIX || SOLARIS || HPUX || AIX || ALTIX || OSX)
X+#if (LINUX || IRIX || SOLARIS || HPUX || AIX || ALTIX || OSX || FreeBSD)
X 		if ((p->target_options & RX_READAFTERWRITE) && (p->target_options & RX_RAW_READER)) { 
X // fprintf(stderr,"Reader: RAW check - dataready=%lld, trigger=%x\n",data_ready,p->raw_trigger);
X 			/* Check to see if we can read more data - if not see where we are at */
X 			if (p->raw_trigger & RX_RAW_STAT) { /* This section will continually poll the file status waiting for the size to increase so that it can read more data */
X 				while (data_ready < p->iosize) {
X 					/* Stat the file so see if there is data to read */
X-#if (LINUX || OSX)
X+#if (LINUX || OSX || FreeBSD)
X 					status = fstat(p->fd,&statbuf);
X #else
X 					status = fstat64(p->fd,&statbuf);
X@@ -472,11 +472,11 @@
X 					sleep_time_dw = sleep_time;
X #ifdef WIN32
X 					Sleep(sleep_time_dw);
X-#elif (LINUX || IRIX || AIX || ALTIX || OSX) /* Change this line to use usleep */
X+#elif (LINUX || IRIX || AIX || ALTIX || OSX || FreeBSD) /* Change this line to use usleep */
X 					if ((sleep_time_dw*CLK_TCK) > 1000) /* only sleep if it will be 1 or more ticks */
X #if (IRIX || ALTIX)
X 						sginap((sleep_time_dw*CLK_TCK)/1000);
X-#elif (LINUX || AIX || OSX) /* Change this line to use usleep */
X+#elif (LINUX || AIX || OSX || FreeBSD) /* Change this line to use usleep */
X 						usleep(sleep_time_dw*1000);
X #endif
X #endif
X@@ -564,7 +564,7 @@
X #else /* UUUUUUUUUUUUUUUU Begin Unix stuff UUUUUUUUUUUUUUUUU*/
X #if (IRIX || SOLARIS || HPUX || AIX || ALTIX)
X 		lseek64(p->fd,(off64_t)p->my_current_byte_location,0); 
X-#elif (LINUX || OSX)
X+#elif (LINUX || OSX || FreeBSD)
X 		/* In Linux the -D_FILE_OFFSET_BITS=64 make the off_t type be a 64-bit integer */
X                 if (!p->target_options & RX_SGIO) 
X 		    lseek(p->fd, (off_t)p->my_current_byte_location, SEEK_SET);
X@@ -653,7 +653,7 @@
X             }
X         }
X         
X-#if (LINUX || IRIX || SOLARIS || HPUX || AIX || ALTIX || OSX)
X+#if (LINUX || IRIX || SOLARIS || HPUX || AIX || ALTIX || OSX || FreeBSD)
X 		if ((p->target_options & RX_READAFTERWRITE) && (p->target_options & RX_RAW_WRITER)) {
X 			/* Since I am the writer in a read-after-write operation, and if we are using a socket connection to the reader for write-completion messages
X 			 * then I need to send the reader a message of what I just wrote - starting location and length of write.
END-of-xdd/files/patch-xdd.c
echo x - xdd/files/patch-xdd.h
sed 's/^X//' >xdd/files/patch-xdd.h << 'END-of-xdd/files/patch-xdd.h'
X--- xdd.h.orig	Mon Dec 19 03:13:28 2005
X+++ xdd.h	Mon May 29 04:45:14 2006
X@@ -46,7 +46,7 @@
X #include <sys/ipc.h>
X #include <sys/sem.h>
X #include <sys/times.h>
X-#if !(SOLARIS || HPUX || AIX || OSX)
X+#if !(SOLARIS || HPUX || AIX || OSX || FreeBSD)
X #include <sys/prctl.h>
X #endif
X #include <sys/param.h>
X@@ -68,6 +68,11 @@
X #include <sys/procset.h>
X #include <sys/utsname.h>
X #endif
X+#ifdef FreeBSD
X+#include <inttypes.h>
X+#include <sys/types.h>
X+#include <sys/unistd.h>
X+#endif
X #ifdef AIX
X #include <sys/processor.h>
X #include <ulimit.h>
X@@ -90,7 +95,7 @@
X #include <sys/utsname.h>
X #endif
X /* for the global clock stuff */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X #include <netdb.h>
X #include <sys/socket.h>
X #include <netinet/in.h>
X@@ -197,7 +202,7 @@
X #ifdef HPUX
X typedef unsigned short in_port_t;
X #endif
X-#if (LINUX || SOLARIS || HPUX || AIX || OSX)
X+#if (LINUX || SOLARIS || HPUX || AIX || OSX || FreeBSD)
X #define MP_MUSTRUN 1 /* ASsign this thread to a specific processor */
X #define MP_NPROCS 2 /* return the number of processors on the system */
X typedef int  sd_t;  /* A socket descriptor */
X@@ -290,8 +295,13 @@
X #define RX_SHARED_MEMORY    0x020000000  /* Use a shared memory segment instead of malloced memmory */
X #define RX_VERBOSE          0x040000000  /* Verbose output */
X #define RX_SEQUENCED_PATTERN 0x080000000  /* Sequenced Data Pattern in the data buffer */
X+#if (FreeBSD)
X+#define RX_NOMEMLOCK         0x100000000LL  /* Do not lock memory */
X+#define RX_NOPROCLOCK        0x200000000LL  /* Do not lock process */
X+#else
X #define RX_NOMEMLOCK         0x100000000  /* Do not lock memory */
X #define RX_NOPROCLOCK        0x200000000  /* Do not lock process */
X+#endif
X /* ts_options bit settings */
X #define TS_NORMALIZE        0x00000001 /* Time stamping normalization of output*/
X #define TS_ON               0x00000002 /* Time stamping is ON */
X@@ -330,14 +340,14 @@
X /* XXX *//* This needs to be converted to use a config file */
X /* Default flag values */
X #define DFL_FL_SERVER false  /* Client by default */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || FreeBSD)
X #define DFL_FL_ADDR INADDR_ANY /* Any address */  /* server only */
X #else /* Windows */
X #define DFL_FL_ADDR 0x8065b61b /* crystal 128.101.182.27 */
X #endif
X #define DFL_FL_PORT 2000  /* Port to use */
X #define DFL_FL_COUNT 10  /* Bounce a hundred times */
X-#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX)
X+#if (LINUX || AIX || IRIX || SOLARIS || HPUX || ALTIX || OSX || FreeBSD)
X #define DFL_FL_TIME 99160##000000000000LL /* Zero means don't wait */
X #else
X #define DFL_FL_TIME 99160##000000000000I64 /* Zero means don't wait */
END-of-xdd/files/patch-xdd.h
echo x - xdd/files/patch-parse.c
sed 's/^X//' >xdd/files/patch-parse.c << 'END-of-xdd/files/patch-parse.c'
X--- parse.c.orig	Thu Jun  1 14:48:28 2006
X+++ parse.c	Thu Jun  1 14:56:44 2006
X@@ -697,7 +697,7 @@
X xddfunc_delay(int32_t argc, char *argv[])
X { 
X 	xgp->passdelay = atoi(argv[1]);
X-    return(1);
X+    return(2);
X }
X /*----------------------------------------------------------------------------*/
X // Delete the target file when complete
X@@ -1101,7 +1101,7 @@
X xddfunc_maxerrors(int32_t argc, char *argv[])
X {
X 	xgp->max_errors = atoi(argv[1]);
X-    return(1);
X+    return(2);
X }
X /*----------------------------------------------------------------------------*/
X // Set the maximum runtime priority
END-of-xdd/files/patch-parse.c
echo x - xdd/pkg-descr
sed 's/^X//' >xdd/pkg-descr << 'END-of-xdd/pkg-descr'
XFrom the Xdd User's Guide:
X
XAbout xdd
X
XXdd is a tool for measuring and characterizing disk subsystem I/O
Xon single systems and clusters of systems. It is a command-line
Xbased tool that grew out of the UNIX world and has been ported to
Xrun in Windows environments as well. It is designed to provide
Xconsistent and reproducible performance measurements of disk I/O
Xtraffic. There are three basic components to xdd that include the
Xxdd program itself, a timeserver program, and a gettime program.
XThe timeserver and gettime programs are used to synchronize the
Xclocks of xdd programs simultaneously running across multiple
Xcomputer systems.
X
Xhttp://www.ioperformance.com/
END-of-xdd/pkg-descr
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607252101.k6PL1EH5042826>