summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2006-10-04 19:08:12 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2006-10-04 19:08:12 +0000
commitcb23f70b2a93c92ce152332e22f3da252a4851a7 (patch)
treef5b9da0e9f7218a92d8bee0249e8f358eb6c5523 /tests
parentbddfe47e01c98e473a825b73fba6bfc5b26203e6 (diff)
downloadlibgphoto2-cb23f70b2a93c92ce152332e22f3da252a4851a7.tar.gz
Use _GPHOTO2_INTERNAL_CODE to compile internal code, put GP_DEBUG there.
* GP_DEBUG now is only available if _GPHOTO2_INTERNAL_CODE is defined. * _GPHOTO2_INTERNAL_CODE is defined via AM_CPPFLAGS, so all code should be compiled correctly. * Users of GP_DEBUG external to the gphoto project should use something else. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9265 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/ddb/ddb-common.h2
-rw-r--r--tests/ddb/ddb-txt.y1
-rw-r--r--tests/ddb/test-ddb.c1
-rw-r--r--tests/test-pedantic-compilation.cxx9
5 files changed, 6 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 70df7b9e3..8ea93c4d7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -54,6 +54,9 @@ PEDANTIC_CXXFLAGS =
endif
test_pedantic_c_SOURCES = test-pedantic-compilation.c
+test_pedantic_c_CPPFLAGS = \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ -U _GPHOTO2_INTERNAL_CODE
test_pedantic_c_CFLAGS = $(PEDANTIC_CFLAGS) $(AM_CFLAGS) $(CFLAGS)
test_pedantic_c_LDADD = \
$(top_builddir)/libgphoto2/libgphoto2.la \
@@ -62,6 +65,9 @@ test_pedantic_c_LDADD = \
$(INTLLIBS)
test_pedantic_cxx_SOURCES = test-pedantic-compilation.cxx
+test_pedantic_cxx_CPPFLAGS = \
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ -U _GPHOTO2_INTERNAL_CODE
test_pedantic_cxx_CXXFLAGS = $(PEDANTIC_CXXFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
test_pedantic_cxx_LDADD = \
$(top_builddir)/libgphoto2/libgphoto2.la \
diff --git a/tests/ddb/ddb-common.h b/tests/ddb/ddb-common.h
index 383a526ef..43905f8b4 100644
--- a/tests/ddb/ddb-common.h
+++ b/tests/ddb/ddb-common.h
@@ -23,8 +23,6 @@
#ifndef __DDB_TXT_H__
#define __DDB_TXT_H__
-#define _GPHOTO2_INTERNAL_CODE
-
#include <stdio.h>
#include <gphoto2/gphoto2-abilities-list.h>
diff --git a/tests/ddb/ddb-txt.y b/tests/ddb/ddb-txt.y
index 1596827e9..85629f60e 100644
--- a/tests/ddb/ddb-txt.y
+++ b/tests/ddb/ddb-txt.y
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <string.h>
-#define _GPHOTO2_INTERNAL_CODE
#include <gphoto2/gphoto2-abilities-list.h>
#include "ddb-common.h"
diff --git a/tests/ddb/test-ddb.c b/tests/ddb/test-ddb.c
index 17e529fbf..b07caa629 100644
--- a/tests/ddb/test-ddb.c
+++ b/tests/ddb/test-ddb.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
-#define _GPHOTO2_INTERNAL_CODE
#include <gphoto2/gphoto2-abilities-list.h>
#include "ddb-common.h"
diff --git a/tests/test-pedantic-compilation.cxx b/tests/test-pedantic-compilation.cxx
index 0b501f9b8..92898219a 100644
--- a/tests/test-pedantic-compilation.cxx
+++ b/tests/test-pedantic-compilation.cxx
@@ -1,12 +1,3 @@
-/* Defining GP_DEBUG before including gphoto2-port-log.h prevents the
- * latter from defining GP_DEBUG as a variadic macro. Variadic macros
- * have not been defined in ANSI C, so we are cheating here.
- *
- * This should be the only problem we cause, and thus work around it
- * here.
- */
-#define GP_DEBUG
-
#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-camera.h>
#include <gphoto2/gphoto2-list.h>