Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2014 14:17:03 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363158 - in head/benchmarks: bonnie bonnie/files dbs/files iozone21/files nbench/files ttcp/files
Message-ID:  <201407281417.s6SEH3N6083376@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Mon Jul 28 14:17:02 2014
New Revision: 363158
URL: http://svnweb.freebsd.org/changeset/ports/363158
QAT: https://qat.redports.org/buildarchive/r363158/

Log:
  Rename benchmark/ patch-xy patches to reflect the files they modify.

Added:
  head/benchmarks/bonnie/files/patch-Bonnie.c
     - copied unchanged from r363137, head/benchmarks/bonnie/files/patch-ab
  head/benchmarks/dbs/files/patch-src_Makefile
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-aa
  head/benchmarks/dbs/files/patch-src_dbsc.c
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-ab
  head/benchmarks/dbs/files/patch-src_dbsd.c
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-ac
  head/benchmarks/dbs/files/patch-src_record.h
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-src__record.h
  head/benchmarks/dbs/files/patch-src_scan.c
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-ad
  head/benchmarks/dbs/files/patch-src_sendrecv.c
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-ae
  head/benchmarks/dbs/files/patch-src_tcp_trace.c
     - copied unchanged from r363137, head/benchmarks/dbs/files/patch-ag
  head/benchmarks/iozone21/files/patch-Makefile
     - copied unchanged from r363137, head/benchmarks/iozone21/files/patch-aa
  head/benchmarks/nbench/files/patch-Makefile
     - copied unchanged from r363137, head/benchmarks/nbench/files/patch-ad
  head/benchmarks/nbench/files/patch-nbench1.h
     - copied unchanged from r363137, head/benchmarks/nbench/files/patch-aa
  head/benchmarks/nbench/files/patch-sysinfo.sh
     - copied unchanged from r363137, head/benchmarks/nbench/files/patch-ab
  head/benchmarks/nbench/files/patch-sysspec.h
     - copied unchanged from r363137, head/benchmarks/nbench/files/patch-ac
  head/benchmarks/ttcp/files/patch-ttcp.c
     - copied unchanged from r363137, head/benchmarks/ttcp/files/patch-aa
Deleted:
  head/benchmarks/bonnie/files/patch-ab
  head/benchmarks/dbs/files/patch-aa
  head/benchmarks/dbs/files/patch-ab
  head/benchmarks/dbs/files/patch-ac
  head/benchmarks/dbs/files/patch-ad
  head/benchmarks/dbs/files/patch-ae
  head/benchmarks/dbs/files/patch-ag
  head/benchmarks/dbs/files/patch-src__record.h
  head/benchmarks/iozone21/files/patch-aa
  head/benchmarks/nbench/files/patch-aa
  head/benchmarks/nbench/files/patch-ab
  head/benchmarks/nbench/files/patch-ac
  head/benchmarks/nbench/files/patch-ad
  head/benchmarks/ttcp/files/patch-aa
Modified:
  head/benchmarks/bonnie/Makefile

Modified: head/benchmarks/bonnie/Makefile
==============================================================================
--- head/benchmarks/bonnie/Makefile	Mon Jul 28 14:12:36 2014	(r363157)
+++ head/benchmarks/bonnie/Makefile	Mon Jul 28 14:17:02 2014	(r363158)
@@ -21,8 +21,6 @@ OPTIONS_DEFINE=	STATIC
 
 STATIC_CFLAGS+=	-static
 
-.include <bsd.port.options.mk>
-
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/Bonnie ${STAGEDIR}${PREFIX}/bin/bonnie
 	${INSTALL_MAN} ${FILESDIR}/bonnie.1 ${STAGEDIR}${PREFIX}/man/man1

Copied: head/benchmarks/bonnie/files/patch-Bonnie.c (from r363137, head/benchmarks/bonnie/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/bonnie/files/patch-Bonnie.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/bonnie/files/patch-ab)
@@ -0,0 +1,127 @@
+--- Bonnie.c.orig	1996-08-29 01:23:49.000000000 +0900
++++ Bonnie.c	2009-08-21 23:05:39.000000000 +0900
+@@ -25,6 +25,9 @@
+ 
+ #include <unistd.h>
+ #include <stdio.h>
++#if !defined(SysV)
++#include <stdlib.h>
++#endif
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -49,7 +52,7 @@
+ #define Seeks (4000)
+ #define UpdateSeek (10)
+ #define SeekProcCount (3)
+-#define Chunk (16384)
++#define Chunk (8192)
+ 
+ /* labels for the tests, used as an array index */
+ typedef enum
+@@ -87,7 +90,7 @@
+ static double last_cpustamp = 0.0;       /* for computing delta-t */
+ static double last_timestamp = 0.0;      /* for computing delta-t */
+ 
+-main(
++int main(
+   int    argc,
+   char * argv[])
+ {
+@@ -146,7 +149,7 @@
+   /* size is in meg, rounded down to multiple of Chunk */
+   size *= (1024 * 1024);
+   size = Chunk * (size / Chunk);
+-  fprintf(stderr, "File '%s', size: %ld\n", name, size);
++  fprintf(stderr, "File '%s', size: %lld\n", name, size);
+ 
+   /* Fill up a file, writing it a char at a time with the stdio putc() call */
+   fprintf(stderr, "Writing with putc()...");
+@@ -167,7 +170,7 @@
+ 
+   /* Now read & rewrite it using block I/O.  Dirty one word in each block */
+   newfile(name, &fd, &stream, 0);
+-  if (lseek(fd, (off_t) 0, 0) == (off_t) -1)
++  if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) -1)
+     io_error("lseek(2) before rewrite");
+   fprintf(stderr, "Rewriting...");
+   timestamp();
+@@ -179,7 +182,7 @@
+     if (bufindex == Chunk / IntSize)
+       bufindex = 0;
+     buf[bufindex++]++;
+-    if (lseek(fd, (off_t) -words, 1) == -1)
++    if (lseek(fd, (off_t) -words, SEEK_CUR) == -1)
+       io_error("relative lseek(2)");
+     if (write(fd, (char *) buf, words) == -1)
+       io_error("re write(2)");
+@@ -235,7 +238,7 @@
+ 
+   /* Now suck it in, Chunk at a time, as fast as we can */
+   newfile(name, &fd, &stream, 0);
+-  if (lseek(fd, (off_t) 0, 0) == -1)
++  if (lseek(fd, (off_t) 0, SEEK_SET) == -1)
+     io_error("lseek before read");
+   fprintf(stderr, "Reading intelligently...");
+   timestamp();
+@@ -288,6 +291,7 @@
+     { /* child process */
+ 
+       /* set up and wait for the go-ahead */
++      close(0);
+       close(seek_feedback[0]);
+       close(seek_control[1]);
+       newfile(name, &fd, &stream, 0);
+@@ -303,7 +307,12 @@
+       /* loop until we read a 0 ticket back from our parent */
+       while(seek_tickets[0])
+       { /* until Mom says stop */
+-        doseek((long) (random() % (size / Chunk)), fd,
++        off_t seekto;
++        if (size / Chunk < (1 << 25))
++          seekto = random() % (size / Chunk);
++        else
++          seekto = (((off_t)random() << 31) + random()) % (size / Chunk);
++        doseek(seekto, fd,
+ 	  ((lseek_count++ % UpdateSeek) == 0));
+ 	if (read(seek_control[0], seek_tickets, 1) != 1)
+ 	  io_error("read ticket");
+@@ -413,7 +422,7 @@
+   printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec ");
+   printf("%%CPU  /sec %%CPU\n");
+ 
+-  printf("%-8.8s %4d ", machine, size / (1024 * 1024));
++  printf("%-8.8s %4lld ", machine, size / (1024 * 1024));
+   printf("%5d %4.1f %5d %4.1f %5d %4.1f ",
+     (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)),
+     delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0,
+@@ -529,7 +538,10 @@
+ {
+   char buf[Chunk];
+ 
+-  sprintf(buf, "Bonnie: drastic I/O error (%s)", message);
++  if((errno == EOVERFLOW) || (errno == EFBIG))
++    sprintf(buf, "\nBonnie: drastic I/O error (%s): %s", message, strerror(errno));
++  else
++    sprintf(buf, "\nBonnie: drastic I/O error (%s)", message);
+   perror(buf);
+   exit(1);
+ }
+@@ -557,7 +569,7 @@
+   off_t size;
+ 
+   probe = where * Chunk;
+-  if (lseek(fd, probe, 0) != probe)
++  if (lseek(fd, (off_t)probe, SEEK_SET) != probe)
+     io_error("lseek in doseek");
+   if ((size = read(fd, (char *) buf, Chunk)) == -1)
+     io_error("read in doseek");
+@@ -568,7 +580,7 @@
+ 
+     /* touch a word */
+     buf[((int) random() % (size/IntSize - 2)) + 1]--;
+-    if (lseek(fd, (long) probe, 0) != probe)
++    if (lseek(fd, (off_t)probe, SEEK_SET) != probe)
+       io_error("lseek in doseek update");
+     if (write(fd, (char *) buf, size) == -1)
+       io_error("write in doseek");

Copied: head/benchmarks/dbs/files/patch-src_Makefile (from r363137, head/benchmarks/dbs/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_Makefile	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-aa)
@@ -0,0 +1,33 @@
+--- src/Makefile--	Sat Aug  1 19:13:01 1998
++++ src/Makefile	Sat Aug  1 19:44:49 1998
+@@ -27,10 +27,10 @@
+ #    make install
+ #
+ 
+-BIN     =/usr/local/etc
++BIN     = ${PREFIX}/bin
+ 
+ #CC     =gcc
+-CFLAGS  =-O
++CFLAGS  +=-DHAVE_SYS_PARAM_H
+ 
+ #CFLAGS	=-g                    # debug
+ #CFLAGS =-g -DDEBUGMODE
+@@ -51,7 +51,7 @@
+ obj::
+ 	(cd ../obj/$(UNAME); make)
+ 
+-UNAME = `uname|tr -d '/'``uname -r|tr -d '/'`
++UNAME = `uname|tr -d '/'`
+ dir::
+ 	-@ mkdir ../obj
+ 	-@ mkdir ../obj/$(UNAME)
+@@ -74,7 +74,7 @@
+ 	etags *.c *.h
+ 
+ install::
+-	cp -p dbsc dbsd ../script/dbs_view $(BIN)
++	cp -p dbsc dbsd ../../script/dbs_view $(BIN)
+ 
+ dbsc: dbsc.o scan.o dbs.o
+ 	$(CC) $(BSTATIC) dbsc.o scan.o dbs.o -o $@ -lm $(LDFLAGS)

Copied: head/benchmarks/dbs/files/patch-src_dbsc.c (from r363137, head/benchmarks/dbs/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_dbsc.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-ab)
@@ -0,0 +1,22 @@
+--- src/dbsc.c--	Mon Jun  8 00:23:35 1998
++++ src/dbsc.c	Sat Aug  1 19:29:49 1998
+@@ -51,6 +51,10 @@
+ 
+ #define DBSC
+ 
++#ifdef HAVE_SYS_PARAM_H
++#include <sys/param.h>
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -69,7 +73,7 @@
+ #include <arpa/inet.h>
+ #include <errno.h>
+ 
+-#if !defined(bsdi)
++#if (!defined(BSD) || (BSD < 199306))
+ #include <malloc.h>
+ #endif
+ 

Copied: head/benchmarks/dbs/files/patch-src_dbsd.c (from r363137, head/benchmarks/dbs/files/patch-ac)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_dbsd.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-ac)
@@ -0,0 +1,35 @@
+--- src/dbsd.c.orig	Sun Jun  7 19:23:26 1998
++++ src/dbsd.c	Sat Sep 18 17:19:36 1999
+@@ -51,6 +51,9 @@
+ 
+ #define DBSD
+ 
++#ifdef HAVE_SYS_PARAM_H
++#include <sys/param.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -80,7 +83,7 @@
+ #include <sys/fcntl.h>
+ #endif
+ 
+-#if !defined(bsdi)
++#if (!defined(BSD) || (BSD < 199306))
+ #include <malloc.h>
+ #endif
+ 
+@@ -1002,8 +1005,13 @@
+ 	    d[i].snd_max      = htonl((int)rt.d[i].td_cb.snd_max);
+ 	    d[i].snd_cwnd     = htonl((int)rt.d[i].td_cb.snd_cwnd);
+ 	    d[i].snd_ssthresh = htonl((int)rt.d[i].td_cb.snd_ssthresh);
++#if !defined(__FreeBSD_version) || (__FreeBSD_version < 400009)
+ 	    d[i].t_idle       = htonl((int)rt.d[i].td_cb.t_idle);
+ 	    d[i].t_rtt        = htonl((int)rt.d[i].td_cb.t_rtt);
++#else
++	    d[i].t_idle       = htonl((int)rt.d[i].td_cb.t_rcvtime);
++	    d[i].t_rtt        = htonl((int)rt.d[i].td_cb.t_rtttime);
++#endif
+ 	    d[i].t_rtseq      = htonl((int)rt.d[i].td_cb.t_rtseq);
+ 	    d[i].t_srtt       = htonl((int)rt.d[i].td_cb.t_srtt);
+ 	    d[i].t_rttvar     = htonl((int)rt.d[i].td_cb.t_rttvar);

Copied: head/benchmarks/dbs/files/patch-src_record.h (from r363137, head/benchmarks/dbs/files/patch-src__record.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_record.h	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-src__record.h)
@@ -0,0 +1,12 @@
+--- src/record.h.orig	1997-10-13 09:36:38.000000000 +0900
++++ src/record.h	2012-04-29 03:08:53.000000000 +0900
+@@ -69,7 +69,9 @@
+ #include <netinet/tcp.h>
+ 
+ #ifndef __linux__
++#ifndef __FreeBSD__
+ #include <netinet/in_pcb.h>
++#endif
+ #include <netinet/ip_var.h>
+ #include <netinet/tcpip.h>
+ /*#define TCPSTATES*/

Copied: head/benchmarks/dbs/files/patch-src_scan.c (from r363137, head/benchmarks/dbs/files/patch-ad)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_scan.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-ad)
@@ -0,0 +1,22 @@
+--- src/scan.c--	Fri Jul 11 00:54:12 1997
++++ src/scan.c	Sat Aug  1 19:33:34 1998
+@@ -49,6 +49,9 @@
+  * $Author: yukio-m $
+  *****************************************************************/
+ 
++#ifdef HAVE_SYS_PARAM_H
++#include <sys/param.h>
++#endif
+ #include<stdio.h>
+ #include<stdlib.h>
+ 
+@@ -58,7 +61,8 @@
+ #include <string.h>
+ #endif
+ 
+-#if !defined(bsdi)
++#if (!defined(BSD) || (BSD < 199306))
++#error BSD
+ #include <malloc.h>
+ #endif
+ 

Copied: head/benchmarks/dbs/files/patch-src_sendrecv.c (from r363137, head/benchmarks/dbs/files/patch-ae)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_sendrecv.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-ae)
@@ -0,0 +1,35 @@
+--- src/sendrecv.c--	Mon Oct 13 03:27:19 1997
++++ src/sendrecv.c	Sat Aug  1 19:37:02 1998
+@@ -70,12 +70,12 @@
+ #define INIT_RECORD()  (rdp = rd->d, rd->n=0)
+ #define INIT_RECORD2() (rdp2 = rd2->d, rd2->n=0)
+ 
+-#define RECORD(NO,SIZE) (gettimeofday(&(rdp->tv), &tzp),\
++#define RECORD(NO,SIZE) (gettimeofday(&(rdp->tv), (struct timezone *)&tzp),\
+ 			 rdp->packet_no   = (NO),\
+ 			 rdp->packet_size = (SIZE),\
+ 			 rdp++, rd->n++)
+ 
+-#define RECORD2(NO,SIZE) (gettimeofday(&(rdp2->tv), &tzp),\
++#define RECORD2(NO,SIZE) (gettimeofday(&(rdp2->tv), (struct timezone *)&tzp),\
+ 			  rdp2->packet_no   = (NO),\
+ 			  rdp2->packet_size = (SIZE),\
+ 			  rdp2++, rd2->n++)
+@@ -87,7 +87,7 @@
+ 				    _TP1.tv_usec %= 1000000;\
+ 				}
+ 
+-#define GETTIMEOFDAY(_TPP) gettimeofday(&tp, &tzp);\
++#define GETTIMEOFDAY(_TPP) gettimeofday(&tp, (struct timezone *)&tzp);\
+                            tp.tv_sec  = _TPP.tv_sec  - tp.tv_sec;\
+                            tp.tv_usec = _TPP.tv_usec - tp.tv_usec;\
+                            if (tp.tv_usec < 0) {\
+@@ -108,7 +108,7 @@
+ 	              USLEEP(tp);
+ 
+ /* before 0.00001s */
+-#define WAIT_BEFORE(_TPP) gettimeofday(&tp, &tzp);\
++#define WAIT_BEFORE(_TPP) gettimeofday(&tp, (struct timezone *) &tzp);\
+                           tp.tv_sec  = _TPP.tv_sec  - tp.tv_sec;\
+                           tp.tv_usec = _TPP.tv_usec - tp.tv_usec - 1000;\
+                           if (tp.tv_usec < 0) {\

Copied: head/benchmarks/dbs/files/patch-src_tcp_trace.c (from r363137, head/benchmarks/dbs/files/patch-ag)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/dbs/files/patch-src_tcp_trace.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/dbs/files/patch-ag)
@@ -0,0 +1,11 @@
+--- src/tcp_trace.c--	Thu Nov  2 23:00:13 2000
++++ src/tcp_trace.c	Thu Nov  2 23:00:33 2000
+@@ -307,7 +307,7 @@
+ #ifdef _PATH_UNIX
+     system = _PATH_UNIX;
+ #else    
+-    system = "/vmunix";
++    system = "/kernel";
+ #endif
+ #endif
+     

Copied: head/benchmarks/iozone21/files/patch-Makefile (from r363137, head/benchmarks/iozone21/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/iozone21/files/patch-Makefile	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/iozone21/files/patch-aa)
@@ -0,0 +1,38 @@
+*** /dev/null	Wed Oct  5 14:46:59 1994
+--- Makefile	Wed Oct  5 16:03:22 1994
+***************
+*** 0 ****
+--- 1,33 ----
++ all: iozone
++ 
++ iozone:
++ 	$(CC) $(CFLAGS) -Dbsd4_3 -DOS_TYPE="\"FreeBSD 2.x\"" -o iozone iozone.c
++ 
++ install:
++ 	-@mkdir -p $(DESTDIR)${PREFIX}/bin
++ 	-@mkdir -p $(DESTDIR)${PREFIX}/man/man1
++ 	${BSD_INSTALL_PROGRAM} iozone $(DESTDIR)${PREFIX}/bin
++ 	@echo .Dd `/bin/date` > iozone.1
++ 	@echo .Dt IOZONE 1 >> iozone.1
++ 	@echo .Sh NAME >> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Nd Performance Test of Sequential File I/O  >> iozone.1
++ 	@echo .Sh SYNOPSIS >> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Op Ar megabytes >> iozone.1
++ 	@echo .Op Ar record_length_in_bytes >> iozone.1
++ 	@echo .Op Ar [path]filename>> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Ar auto[=filename] >> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Ar raw[=filename] >> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Ar cdrom[=filename] >> iozone.1
++ 	@echo .Nm iozone >> iozone.1
++ 	@echo .Ar help >> iozone.1
++ 	@echo .Sh DESCRIPTION >> iozone.1
++ 	./iozone help|awk '{if (/Copyright/) x++} {if (/For V1.06/) exit;}\
++ 		 {if (x) print $0}' >>iozone.1
++ 	@echo .Sh AUTHOR >> iozone.1
++ 	@echo Bill Norcott >> iozone.1
++ 	${BSD_INSTALL_MAN} iozone.1 $(DESTDIR)${PREFIX}/man/man1

Copied: head/benchmarks/nbench/files/patch-Makefile (from r363137, head/benchmarks/nbench/files/patch-ad)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/nbench/files/patch-Makefile	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/nbench/files/patch-ad)
@@ -0,0 +1,24 @@
+--- Makefile.orig	Mon Oct 18 00:07:05 2004
++++ Makefile	Mon Oct 18 00:07:51 2004
+@@ -19,10 +19,10 @@ default: nbench
+ # You should leave -static in the CFLAGS so that your sysinfo can be
+ # compiled into the executable.
+ 
+-CC = gcc
++CC ?= gcc
+ 
+ # generic options for gcc
+-CFLAGS = -s -static -Wall -O3
++CFLAGS += -static -DDATADIR=\"${PREFIX}/share/nbench/\"
+ 
+ # if your gcc lets you do it, then try this one
+ #CFLAGS = -s -static -Wall -O3 -fomit-frame-pointer -funroll-loops
+@@ -126,7 +126,7 @@ pointer.h: pointer Makefile
+ 	if [ "4" = `./pointer` ] ; then touch pointer.h ;\
+ 	else echo "#define LONG64" >pointer.h ; fi
+ 
+-misc.o: misc.h misc.c Makefile
++misc.o: misc.h misc.c nmglobal.h pointer.h Makefile
+ 	$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
+ 		-c misc.c
+ 

Copied: head/benchmarks/nbench/files/patch-nbench1.h (from r363137, head/benchmarks/nbench/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/nbench/files/patch-nbench1.h	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/nbench/files/patch-aa)
@@ -0,0 +1,11 @@
+--- nbench1.h.orig	Thu Dec 11 20:54:46 1997
++++ nbench1.h	Wed Dec 17 08:28:11 1997
+@@ -352,7 +352,7 @@
+ ** The Neural Net test requires an input data file.
+ ** The name is specified here.
+ */
+-char *inpath="NNET.DAT";
++char *inpath=DATADIR "NNET.DAT";
+ 
+ /*
+ ** PROTOTYPES

Copied: head/benchmarks/nbench/files/patch-sysinfo.sh (from r363137, head/benchmarks/nbench/files/patch-ab)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/nbench/files/patch-sysinfo.sh	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/nbench/files/patch-ab)
@@ -0,0 +1,13 @@
+--- sysinfo.sh.orig	Mon Oct 18 00:03:53 2004
++++ sysinfo.sh	Mon Oct 18 00:04:35 2004
+@@ -50,8 +50,8 @@
+ 
+ # this bombs out on Ultrix which expect "cut -d"
+ 
+-compsystem=`uname -a | cut -b 1-78`
+-compdate=`date|cut -b1-55`
++compsystem=`uname -a | cut -f 1-78`
++compdate=`date | cut -f 1-55`
+ 
+ # let's hope that ctrl-c is not part of any string here
+ # this also will barf later if " is in any of the strings

Copied: head/benchmarks/nbench/files/patch-sysspec.h (from r363137, head/benchmarks/nbench/files/patch-ac)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/nbench/files/patch-sysspec.h	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/nbench/files/patch-ac)
@@ -0,0 +1,11 @@
+--- sysspec.h.orig	Mon Oct 18 00:05:17 2004
++++ sysspec.h	Mon Oct 18 00:05:50 2004
+@@ -33,7 +33,7 @@
+ 
+ #include "nmglobal.h"
+ 
+-#if !defined(MAC) && !defined(OSX)
++#if !defined(MAC) && !defined(__STDC__)
+ #include <malloc.h>
+ #endif
+ 

Copied: head/benchmarks/ttcp/files/patch-ttcp.c (from r363137, head/benchmarks/ttcp/files/patch-aa)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/benchmarks/ttcp/files/patch-ttcp.c	Mon Jul 28 14:17:02 2014	(r363158, copy of r363137, head/benchmarks/ttcp/files/patch-aa)
@@ -0,0 +1,257 @@
+--- ttcp.c.orig	Thu Oct 18 12:26:35 2001
++++ ttcp.c	Thu Oct 18 12:31:00 2001
+@@ -55,6 +55,9 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <sys/time.h>		/* struct timeval */
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
+ 
+ #if defined(SYSV)
+ #include <sys/times.h>
+@@ -133,7 +136,7 @@
+ 
+ void err();
+ void mes();
+-int pattern();
++void pattern();
+ void prep_timer();
+ double read_timer();
+ int Nread();
+@@ -147,6 +150,7 @@
+ {
+ }
+ 
++int
+ main(argc,argv)
+ int argc;
+ char **argv;
+@@ -249,6 +253,7 @@
+ #endif /* cray */
+ 		}
+ 		sinhim.sin_port = htons(port);
++		sinme.sin_family = AF_INET;     /* Solaris needs this */
+ 		sinme.sin_port = 0;		/* free choice */
+ 	} else {
+ 		/* rcvr */
+@@ -263,29 +268,31 @@
+ 	if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL)
+ 		err("malloc");
+ 	if (bufalign != 0)
+-		buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign;
++		buf += (bufalign
++			-((unsigned long)buf % bufalign)
++			+ bufoffset) % bufalign;
+ 
+ 	if (trans) {
+-	    fprintf(stdout,
++	    fprintf(stderr,
+ 	    "ttcp-t: buflen=%d, nbuf=%d, align=%d/%d, port=%d",
+ 		buflen, nbuf, bufalign, bufoffset, port);
+  	    if (sockbufsize)
+- 		fprintf(stdout, ", sockbufsize=%d", sockbufsize);
+- 	    fprintf(stdout, "  %s  -> %s\n", udp?"udp":"tcp", host);
++ 		fprintf(stderr, ", sockbufsize=%d", sockbufsize);
++ 	    fprintf(stderr, "  %s  -> %s\n", udp?"udp":"tcp", host);
+ 	} else {
+-	    fprintf(stdout,
++	    fprintf(stderr,
+  	    "ttcp-r: buflen=%d, nbuf=%d, align=%d/%d, port=%d",
+  		buflen, nbuf, bufalign, bufoffset, port);
+  	    if (sockbufsize)
+- 		fprintf(stdout, ", sockbufsize=%d", sockbufsize);
+- 	    fprintf(stdout, "  %s\n", udp?"udp":"tcp");
++ 		fprintf(stderr, ", sockbufsize=%d", sockbufsize);
++ 	    fprintf(stderr, "  %s\n", udp?"udp":"tcp");
+ 	}
+ 
+ 	if ((fd = socket(AF_INET, udp?SOCK_DGRAM:SOCK_STREAM, 0)) < 0)
+ 		err("socket");
+ 	mes("socket");
+ 
+-	if (bind(fd, &sinme, sizeof(sinme)) < 0)
++	if (bind(fd, (struct sockaddr *) &sinme, sizeof(sinme)) < 0)
+ 		err("bind");
+ 
+ #if defined(SO_SNDBUF) || defined(SO_RCVBUF)
+@@ -326,7 +333,7 @@
+ 			mes("nodelay");
+ 		}
+ #endif
+-		if(connect(fd, &sinhim, sizeof(sinhim) ) < 0)
++		if(connect(fd, (struct sockaddr*)&sinhim, sizeof(sinhim) ) < 0)
+ 			err("connect");
+ 		mes("connect");
+ 	    } else {
+@@ -348,11 +355,11 @@
+ 		}
+ 		fromlen = sizeof(frominet);
+ 		domain = AF_INET;
+-		if((fd=accept(fd, &frominet, &fromlen) ) < 0)
++		if((fd=accept(fd, (struct sockaddr*)&frominet, &fromlen) ) < 0)
+ 			err("accept");
+ 		{ struct sockaddr_in peer;
+ 		  int peerlen = sizeof(peer);
+-		  if (getpeername(fd, (struct sockaddr_in *) &peer, 
++		  if (getpeername(fd, (struct sockaddr*) &peer, 
+ 				&peerlen) < 0) {
+ 			err("getpeername");
+ 		  }
+@@ -412,25 +419,25 @@
+ 	}
+ 	if( cput <= 0.0 )  cput = 0.001;
+ 	if( realt <= 0.0 )  realt = 0.001;
+-	fprintf(stdout,
++	fprintf(stderr,
+ 		"ttcp%s: %.0f bytes in %.2f real seconds = %s/sec +++\n",
+ 		trans?"-t":"-r",
+ 		nbytes, realt, outfmt(nbytes/realt));
+ 	if (verbose) {
+-	    fprintf(stdout,
++	    fprintf(stderr,
+ 		"ttcp%s: %.0f bytes in %.2f CPU seconds = %s/cpu sec\n",
+ 		trans?"-t":"-r",
+ 		nbytes, cput, outfmt(nbytes/cput));
+ 	}
+-	fprintf(stdout,
++	fprintf(stderr,
+ 		"ttcp%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n",
+ 		trans?"-t":"-r",
+ 		numCalls,
+ 		1024.0 * realt/((double)numCalls),
+ 		((double)numCalls)/realt);
+-	fprintf(stdout,"ttcp%s: %s\n", trans?"-t":"-r", stats);
++	fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", stats);
+ 	if (verbose) {
+-	    fprintf(stdout,
++	    fprintf(stderr,
+ 		"ttcp%s: buffer address %#x\n",
+ 		trans?"-t":"-r",
+ 		buf);
+@@ -459,6 +466,7 @@
+ 	fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s);
+ }
+ 
++void
+ pattern( cp, cnt )
+ register char *cp;
+ register int cnt;
+@@ -614,13 +622,13 @@
+ 
+ 		case 'U':
+ 			tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime);
+-			sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++			sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'S':
+ 			tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime);
+-			sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000);
++			sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000);
+ 			END(outp);
+ 			break;
+ 
+@@ -642,49 +650,49 @@
+ 			break;
+ 
+ 		case 'X':
+-			sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
++			sprintf(outp,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'D':
+-			sprintf(outp,"%d", t == 0 ? 0 :
++			sprintf(outp,"%ld", t == 0 ? 0 :
+ 			    (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'K':
+-			sprintf(outp,"%d", t == 0 ? 0 :
++			sprintf(outp,"%ld", t == 0 ? 0 :
+ 			    ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) -
+ 			    (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'M':
+-			sprintf(outp,"%d", r1->ru_maxrss/2);
++			sprintf(outp,"%ld", r1->ru_maxrss/2);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'F':
+-			sprintf(outp,"%d", r1->ru_majflt-r0->ru_majflt);
++			sprintf(outp,"%ld", r1->ru_majflt-r0->ru_majflt);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'R':
+-			sprintf(outp,"%d", r1->ru_minflt-r0->ru_minflt);
++			sprintf(outp,"%ld", r1->ru_minflt-r0->ru_minflt);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'I':
+-			sprintf(outp,"%d", r1->ru_inblock-r0->ru_inblock);
++			sprintf(outp,"%ld", r1->ru_inblock-r0->ru_inblock);
+ 			END(outp);
+ 			break;
+ 
+ 		case 'O':
+-			sprintf(outp,"%d", r1->ru_oublock-r0->ru_oublock);
++			sprintf(outp,"%ld", r1->ru_oublock-r0->ru_oublock);
+ 			END(outp);
+ 			break;
+ 		case 'C':
+-			sprintf(outp,"%d+%d", r1->ru_nvcsw-r0->ru_nvcsw,
++			sprintf(outp,"%ld+%ld", r1->ru_nvcsw-r0->ru_nvcsw,
+ 				r1->ru_nivcsw-r0->ru_nivcsw );
+ 			END(outp);
+ 			break;
+@@ -743,6 +751,7 @@
+ /*
+  *			N R E A D
+  */
++int
+ Nread( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -752,7 +761,7 @@
+ 	int len = sizeof(from);
+ 	register int cnt;
+ 	if( udp )  {
+-		cnt = recvfrom( fd, buf, count, 0, &from, &len );
++		cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len );
+ 		numCalls++;
+ 	} else {
+ 		if( b_flag )
+@@ -774,6 +783,7 @@
+ /*
+  *			N W R I T E
+  */
++int
+ Nwrite( fd, buf, count )
+ int fd;
+ void *buf;
+@@ -782,7 +792,7 @@
+ 	register int cnt;
+ 	if( udp )  {
+ again:
+-		cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) );
++		cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) );
+ 		numCalls++;
+ 		if( cnt<0 && errno == ENOBUFS )  {
+ 			delay(18000);
+@@ -803,7 +813,7 @@
+ 
+ 	tv.tv_sec = 0;
+ 	tv.tv_usec = us;
+-	(void)select( 1, (char *)0, (char *)0, (char *)0, &tv );
++	(void)select( 1, NULL, NULL, NULL, &tv );
+ }
+ 
+ /*



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