[MINC-development] Re: [MINC-users] minc-1.4 on Mac OS X 10.4.1

Steve M. Robbins minc-development@bic.mni.mcgill.ca
Sun, 03 Jul 2005 18:36:28 -0400


Howdy,

This note just posted on minc-users

On Sun, Jul 03, 2005 at 10:56:55PM +0100, Morgan Hough wrote:

> 'get_clock_ticks_per_second':volume_io/Prog_utils/time.c:59: error:
> 'CLK_TCK' undeclared (first use in this
> function)volume_io/Prog_utils/time.c:59: error: (Each undeclared
> identifier is reported only oncevolume_io/Prog_utils/time.c:59: error:
> for each function it appears in.)make[2]: ***
> [volume_io/Prog_utils/time.lo] Error 1make[1]: *** [all-recursive] Error
> 1make: *** [all] Error 2

is something that I fixed for Debian last fall, but neglected to
upload.  

Here's the patch.  Shall I go ahead and commit it?

Index: configure.in
===================================================================
RCS file: /home/steve/lib/cvs/debian/minc/configure.in,v
retrieving revision 1.1.1.5
diff -u -b -B -r1.1.1.5 configure.in
--- configure.in	16 May 2005 22:40:21 -0000	1.1.1.5
+++ configure.in	3 Jul 2005 22:27:12 -0000
@@ -43,7 +43,7 @@
 AC_CHECK_FUNCS(mkstemp tempnam tmpnam)
 
 dnl Verify existence of some functions we'd like to use
-AC_CHECK_FUNCS(getpwnam select strerror)
+AC_CHECK_FUNCS(getpwnam select strerror sysconf)
 
 # Functions required for execute_decompress_command().
 AC_FUNC_FORK
Index: volume_io/Prog_utils/time.c
===================================================================
RCS file: /home/steve/lib/cvs/debian/minc/volume_io/Prog_utils/time.c,v
retrieving revision 1.1.1.4
diff -u -b -B -r1.1.1.4 time.c
--- volume_io/Prog_utils/time.c	4 Oct 2004 20:19:22 -0000	1.1.1.4
+++ volume_io/Prog_utils/time.c	3 Jul 2005 22:21:24 -0000
@@ -56,7 +56,11 @@
     if( !initialized )
     {
         initialized = TRUE;
+#if HAVE_SYSCONF
+        clock_ticks_per_second = (Real) sysconf( _SC_CLK_TCK );
+#else
         clock_ticks_per_second = (Real) CLK_TCK;
+#endif
     }
 
     return( clock_ticks_per_second );



-Steve