mdbtools/SOURCES/mdbtools-0.9.3-no-ifdef-HAV...

51 lines
1.5 KiB
Diff

Don't use ifdef HAVE_FOO check in the public mdbtools headers.
Note this is a bit of a hack hardcoding the values (HAVE_GLIB && HAVE_ICONV)
used when building the Fedora packages.
This fixes the following compile error when building libgda-mdb:
cc ... -c gda-mdb-provider.c -fPIC -DPIC -o .libs/gda-mdb-provider.o
In file included from gda-mdb.h:33,
from gda-mdb-provider.c:37:
/usr/include/mdbtools.h:38:10: fatal error: mdbfakeglib.h: No such file or directory
38 | #include <mdbfakeglib.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
diff -up mdbtools-0.9.3/include/mdbsql.h~ mdbtools-0.9.3/include/mdbsql.h
--- mdbtools-0.9.3/include/mdbsql.h~ 2020-12-17 20:07:00.000000000 +0100
+++ mdbtools-0.9.3/include/mdbsql.h 2021-07-10 13:02:45.392122848 +0200
@@ -25,11 +25,7 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_GLIB
#include <glib.h>
-#else
-#include <mdbfakeglib.h>
-#endif
#include <mdbtools.h>
typedef struct MdbSQL
diff -up mdbtools-0.9.3/include/mdbtools.h~ mdbtools-0.9.3/include/mdbtools.h
--- mdbtools-0.9.3/include/mdbtools.h~ 2021-04-05 15:45:40.000000000 +0200
+++ mdbtools-0.9.3/include/mdbtools.h 2021-07-10 13:02:57.377174793 +0200
@@ -32,17 +32,9 @@
#include <string.h>
#include <locale.h>
-#ifdef HAVE_GLIB
#include <glib.h>
-#else
-#include <mdbfakeglib.h>
-#endif
-#if defined(HAVE_ICONV)
#include <iconv.h>
-#elif defined(HAVE_XLOCALE_H)
-#include <xlocale.h>
-#endif
#ifdef _WIN32
#include <io.h>