1
0
Fork 0

FreeBSD support.

This commit is contained in:
curt 1998-11-20 01:03:18 +00:00
parent 90b73f480f
commit 72ea27e43b
2 changed files with 25 additions and 10 deletions

View file

@ -35,15 +35,22 @@
/* TIMING for Windows */ /* TIMING for Windows */
#ifdef WIN32 #ifdef WIN32
#include <sys/timeb.h> # include <sys/timeb.h>
#include <time.h> # include <time.h>
/* TIMING for UNIX */ /* TIMING for UNIX */
#else #else
#include <sys/types.h> # include <sys/types.h>
#include <sys/param.h> # include <sys/param.h>
#include <sys/times.h> # include <sys/times.h>
extern long times( ); # if defined(__FreeBSD__)
long elapsed() # ifndef HZ
# include <time.h>
# define HZ CLK_TCK
# endif /* HZ */
# else
extern long times( );
# endif /* __FreeBSD__ */
long elapsed()
{ {
static long total = 0; static long total = 0;
long cpu_time, dummy; long cpu_time, dummy;
@ -55,7 +62,7 @@ long elapsed()
total = dummy; total = dummy;
return(cpu_time); return(cpu_time);
} }
#endif #endif /* WIN32 */
int norms[STRIP_MAX]; int norms[STRIP_MAX];

View file

@ -10,9 +10,17 @@
/* STRIPE: polvertsex.h /* STRIPE: polvertsex.h
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
#include "queue.h" #ifdef HAVE_CONFIG_H
#include <malloc.h> # include <config.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#else
# include <malloc.h>
#endif
#include "queue.h"
/* external functions */ /* external functions */
void Start_Vert_Struct(); void Start_Vert_Struct();