changeset 1918:f6bc7ec3e05d

Get rid of c99 compilation problems
author bert <bert>
date Tue, 14 Dec 2004 23:38:22 +0000
parents e646e65ddad0
children 8dd9f296e8bb
files libsrc2/dimension.c libsrc2/minc2_private.h libsrc2/test/datatype-test.c libsrc2/test/record-test.c libsrc2/test/slice-test.c libsrc2/volprops.c libsrc2/volume.c progs/mincmath/mincmath.c progs/rawtominc/rawtominc.c volume_io/Prog_utils/time.c
diffstat 10 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libsrc2/dimension.c
+++ b/libsrc2/dimension.c
@@ -5,12 +5,12 @@
  * Functions to create, destroy, and manipulate MINC dimension objects.
  * All functions return MI_NOERROR upon success and MI_ERROR on failure.
  ************************************************************************/
+#define _GNU_SOURCE 1
 #include <stdlib.h>
 #include <hdf5.h>
 #include "minc2.h"
 #include "minc2_private.h"
 
-
 /*! 
   Figure out whether a dimension is associated with a volume.
   \param dimension The dimension handle.
--- a/libsrc2/minc2_private.h
+++ b/libsrc2/minc2_private.h
@@ -159,6 +159,9 @@
                                                              int n_values,
                                                              double **values );
 
+extern double *alloc1d(int);
+extern double **alloc2d(int, int);
+
 /* From hyper.c */
 extern int mitranslate_hyperslab_origin(mihandle_t volume, 
                                         const unsigned long start[], 
--- a/libsrc2/test/datatype-test.c
+++ b/libsrc2/test/datatype-test.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <hdf5.h>
 #include "minc2.h"
 
 int
--- a/libsrc2/test/record-test.c
+++ b/libsrc2/test/record-test.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <string.h>
 #include "minc2.h"
 
 #define TESTRPT(msg, val) (error_cnt++, fprintf(stderr, \
--- a/libsrc2/test/slice-test.c
+++ b/libsrc2/test/slice-test.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include "minc2.h"
 
 int
--- a/libsrc2/volprops.c
+++ b/libsrc2/volprops.c
@@ -13,6 +13,7 @@
  * managing properties is also believed to be more readily extensible than 
  * any obvious alternative.
  ************************************************************************/
+#define _GNU_SOURCE 1
 #include <stdlib.h>
 #include <hdf5.h>
 #include "minc2.h"
--- a/libsrc2/volume.c
+++ b/libsrc2/volume.c
@@ -4,6 +4,7 @@
  *
  * Functions to create, open, and close MINC volume objects.
  ************************************************************************/
+#define _GNU_SOURCE 1
 #include <stdlib.h>
 #include <hdf5.h>
 #include <limits.h>
--- a/progs/mincmath/mincmath.c
+++ b/progs/mincmath/mincmath.c
@@ -10,7 +10,10 @@
 @CREATED    : April 28, 1995 (Peter Neelin)
 @MODIFIED   : 
  * $Log: mincmath.c,v $
- * Revision 6.8  2004-12-03 21:56:51  bert
+ * Revision 6.9  2004-12-14 23:40:07  bert
+ * Get rid of c99 compilation problems
+ *
+ * Revision 6.8  2004/12/03 21:56:51  bert
  * Include config.h
  *
  * Revision 6.7  2004/11/01 22:38:39  bert
@@ -75,9 +78,10 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmath/mincmath.c,v 6.8 2004-12-03 21:56:51 bert Exp $";
+static char rcsid[]="$Header: /private-cvsroot/minc/progs/mincmath/mincmath.c,v 6.9 2004-12-14 23:40:07 bert Exp $";
 #endif
 
+#define _GNU_SOURCE 1
 #include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
--- a/progs/rawtominc/rawtominc.c
+++ b/progs/rawtominc/rawtominc.c
@@ -11,7 +11,10 @@
 @CREATED    : September 25, 1992 (Peter Neelin)
 @MODIFIED   : 
  * $Log: rawtominc.c,v $
- * Revision 6.16  2004-12-03 21:54:27  bert
+ * Revision 6.17  2004-12-14 23:38:52  bert
+ * Get rid of c99 compilation problems
+ *
+ * Revision 6.16  2004/12/03 21:54:27  bert
  * Minor changes for Windows build
  *
  * Revision 6.15  2004/11/01 22:38:39  bert
@@ -149,9 +152,10 @@
 ---------------------------------------------------------------------------- */
 
 #ifndef lint
-static char rcsid[]="$Header: /private-cvsroot/minc/progs/rawtominc/rawtominc.c,v 6.16 2004-12-03 21:54:27 bert Exp $";
+static char rcsid[]="$Header: /private-cvsroot/minc/progs/rawtominc/rawtominc.c,v 6.17 2004-12-14 23:38:52 bert Exp $";
 #endif
 
+#define _GNU_SOURCE 1
 #include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
--- a/volume_io/Prog_utils/time.c
+++ b/volume_io/Prog_utils/time.c
@@ -30,8 +30,12 @@
 #include  <unistd.h>
 #endif
 
+#ifndef CLK_TCK
+#define CLK_TCK CLOCKS_PER_SEC
+#endif
+
 #ifndef lint
-static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.22 2004-10-04 20:23:52 bert Exp $";
+static char rcsid[] = "$Header: /private-cvsroot/minc/volume_io/Prog_utils/time.c,v 1.23 2004-12-14 23:38:22 bert Exp $";
 #endif
 
 /* ----------------------------- MNI Header -----------------------------------