summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in2
-rw-r--r--tests/test-filesys.c28
-rw-r--r--tests/test-gphoto2.c29
4 files changed, 56 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index c39f411fe..b55255035 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-24 Lutz Müller <urc8@rz.uni-karlsruhe.de>
+
+ * configure.in: Check for mcheck.h
+ * tests: #ifdef HAVE_MCHECK_H
+
2001-11-23 Marcus Meissner <marcus@jet.franken.de>
* camlibs/stv0680/library.c: Major rework of the Capture Preview
diff --git a/configure.in b/configure.in
index 508a6af3f..9c99f65d1 100644
--- a/configure.in
+++ b/configure.in
@@ -56,7 +56,7 @@ AC_CHECK_LIB(ibs, main)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdio.h string.h stdlib.h)
+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdio.h string.h stdlib.h mcheck.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
diff --git a/tests/test-filesys.c b/tests/test-filesys.c
index 6df6a5857..a9bd65cfa 100644
--- a/tests/test-filesys.c
+++ b/tests/test-filesys.c
@@ -1,6 +1,28 @@
+/* test-filesys.c
+ *
+ * Copyright (C) 2001 Lutz Müller <urc8@rz.uni-karlsruhe.de>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <config.h>
+
#include <stdio.h>
#include <string.h>
-#ifdef _GNU_SOURCE
+
+#ifdef HAVE_MCHECK_H
#include <mcheck.h>
#endif
@@ -88,7 +110,7 @@ main (int argc, char **argv)
int x, count;
const char *name;
-#ifdef _GNU_SOURCE
+#ifdef HAVE_MCHECK_H
mtrace();
#endif
@@ -210,7 +232,7 @@ main (int argc, char **argv)
printf ("*** Freeing file system...\n");
CHECK (gp_filesystem_free (fs));
-#ifdef _GNU_SOURCE
+#ifdef HAVE_MCHECK_H
muntrace();
#endif
diff --git a/tests/test-gphoto2.c b/tests/test-gphoto2.c
index d74ae47b0..84f7bf36b 100644
--- a/tests/test-gphoto2.c
+++ b/tests/test-gphoto2.c
@@ -1,10 +1,31 @@
-#include <gphoto2-camera.h>
+/* test-gphoto2.c
+ *
+ * Copyright (C) 2001 Lutz Müller <urc8@rz.uni-karlsruhe.de>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <config.h>
#include <stdio.h>
-#ifdef _GNU_SOURCE
+#ifdef HAVE_MCHECK_H
#include <mcheck.h>
#endif
+#include <gphoto2-camera.h>
+
#define CHECK(f) {int res = f; if (res < 0) {printf ("ERROR: %s\n", gp_result_as_string (res)); return (1);}}
int
@@ -16,7 +37,7 @@ main (int argc, char *argv [])
CameraAbilities abilities;
int m;
-#ifdef _GNU_SOURCE
+#ifdef HAVE_MCHECK_H
mtrace();
#endif
@@ -61,7 +82,7 @@ main (int argc, char *argv [])
printf ("Unrefing camera...\n");
CHECK (gp_camera_unref (camera));
-#ifdef _GNU_SOURCE
+#ifdef HAVE_MCHECK_H
muntrace();
#endif