From 7a57eeccd8ded740d88aba3ea9dcb09050983dd0 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 12 Nov 2008 23:02:01 +0000 Subject: Remove stupid MAXPOSLONG define (otherwise standardized as LONG_MAX) git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@13 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- assignment.c | 14 ++++++++++---- bitfield.c | 1 + fpemulation.c | 1 + nbench0.h | 8 ++++---- nmglobal.h | 19 ------------------- numsort.c | 3 ++- 6 files changed, 18 insertions(+), 28 deletions(-) diff --git a/assignment.c b/assignment.c index a4f3b5f..29f79c8 100644 --- a/assignment.c +++ b/assignment.c @@ -1,7 +1,13 @@ -#include +#include +#include +#include +#include +#include + #include "nmglobal.h" #include "nbench1.h" + /************************* ** ASSIGNMENT ALGORITHM ** *************************/ @@ -304,7 +310,7 @@ long currentmin; /* Current minimum */ */ for(i=0;i #include #include +#include #include "nmglobal.h" #include "nbench1.h" diff --git a/fpemulation.c b/fpemulation.c index 26ce951..ac24bd9 100644 --- a/fpemulation.c +++ b/fpemulation.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "nmglobal.h" #include "nbench1.h" diff --git a/nbench0.h b/nbench0.h index d5d76b1..947feba 100644 --- a/nbench0.h +++ b/nbench0.h @@ -206,8 +206,8 @@ char buffer[BUF_SIZ]; /* ** Global parameters. */ -ulong global_min_ticks; /* Minimum ticks */ -ulong global_min_seconds; /* Minimum seconds tests run */ +unsigned long global_min_ticks; /* Minimum ticks */ +unsigned long global_min_seconds; /* Minimum seconds tests run */ int global_allstats; /* Statistics dump flag */ char global_ofile_name[BUF_SIZ];/* Output file name */ FILE *global_ofile; /* Output file */ @@ -219,7 +219,7 @@ int global_align; /* Memory alignment */ ** Following global is the memory array. This is used to store ** original and aligned (modified) memory addresses. */ -ulong mem_array[2][MEM_ARRAY_SIZE]; +unsigned long mem_array[2][MEM_ARRAY_SIZE]; int mem_array_ents; /* # of active entries */ /* @@ -302,7 +302,7 @@ static int getflag(char *cptr); static void strtoupper(char *s); static void set_request_secs(void); static int bench_with_confidence(int fid, - double *mean, double *stdev, ulong *numtries); + double *mean, double *stdev, unsigned long *numtries); /* static int seek_confidence(double scores[5], double *newscore, double *c_half_interval, diff --git a/nmglobal.h b/nmglobal.h index 6c2a145..cb7a6e3 100644 --- a/nmglobal.h +++ b/nmglobal.h @@ -130,25 +130,6 @@ */ #define MINIMUM_SECONDS 5 -/* -** MAXPOSLONG -** -** This is the maximum positive long. -*/ -#ifdef _LP64 -#define MAXPOSLONG 0x7FFFFFFFFFFFFFFFL -#else -#define MAXPOSLONG 0x7FFFFFFFL -#endif - -/* -** OTHER DEFINES -*/ -#ifndef MAC -#define TRUE 1 -#define FALSE 0 -#endif - /* ** Memory array size. Used in SYSSPEC for keeping track ** of re-aligned memory. diff --git a/numsort.c b/numsort.c index f0ab459..34e685f 100644 --- a/numsort.c +++ b/numsort.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "nmglobal.h" #include "nbench1.h" @@ -60,7 +61,7 @@ DoNumSort (void) ** minimum, then allocate for more arrays and ** try again. */ - if (DoNumSortIteration(arraybase, numsortstruct->arraysize, numsortstruct->numarrays)>global_min_ticks) { + if (DoNumSortIteration(arraybase, numsortstruct->arraysize, numsortstruct->numarrays) > global_min_ticks) { break; } -- cgit v1.2.3