]> git.mxchange.org Git - flightgear.git/commitdiff
FreeBSD support.
authorcurt <curt>
Fri, 20 Nov 1998 01:03:18 +0000 (01:03 +0000)
committercurt <curt>
Fri, 20 Nov 1998 01:03:18 +0000 (01:03 +0000)
Stripe_w/bands.c
Stripe_w/polyvertsex.h

index 1992795a6046f6dfe16faaf7e2d5e57b81af64e3..161e8ccde8d4b6772e51bba17aac9f3eb521649a 100644 (file)
 
 /*   TIMING for Windows */
 #ifdef WIN32
-#include <sys/timeb.h>
-#include <time.h>
+#  include <sys/timeb.h>
+#  include <time.h>
 /*   TIMING for UNIX */
 #else
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/times.h>
-extern long times( );
-long elapsed()
+#  include <sys/types.h>
+#  include <sys/param.h>
+#  include <sys/times.h>
+#  if defined(__FreeBSD__)
+#    ifndef HZ
+#      include <time.h>
+#      define HZ CLK_TCK
+#    endif /* HZ */
+#  else
+     extern long times( );
+#  endif /* __FreeBSD__ */
+  long elapsed()
 {
   static long total = 0;
   long cpu_time, dummy;
@@ -55,7 +62,7 @@ long elapsed()
   total    = dummy;
   return(cpu_time);
 }
-#endif
+#endif /* WIN32 */
 
 
 int     norms[STRIP_MAX];
index 8e05a7dd30c63271a6bb36a088d123fa4287f90e..4c541f7bcb19f236b9742dc738f798d5f1b9fb13 100644 (file)
 /*   STRIPE: polvertsex.h
 -----------------------------------------------------------------------*/
 
-#include "queue.h"
-#include <malloc.h>
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+#else
+#  include <malloc.h>
+#endif
 
+#include "queue.h"
 
 /*      external functions */
 void Start_Vert_Struct();