Patch - mdbtools-0.6pre1 compilation problem

"Moloko Vellocet" <[email protected]>
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
Hi, I found a compilation problem with mdbtools-0.6pre1, I'm running:
Fedora Core 4
gcc-4.0.0
glibc 2.3.5

The problem is with the static variable "GHashTable *mdb_backends' found in
the files:
- include/mdbtools.h
- src/libmdb/backend.c
I've ported this static variable to the header mdbtools.h and declared it as
extern in backend.c.


My correction:

diff -ruN mdbtools-0.6pre1/include/mdbtools.h mdbtools-0.6pre1-ajos
/include/mdbtools.h
--- mdbtools-0.6pre1/include/mdbtools.h 2004-06-16 19:42:19.000000000 -0400
+++ mdbtools-0.6pre1-ajos/include/mdbtools.h    2006-05-18 11:41:
31.000000000 -0400
@@ -147,7 +147,7 @@
 #define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3)

 /* hash to store registered backends */
-extern GHashTable      *mdb_backends;
+static GHashTable      *mdb_backends;

 /* forward declarations */
 typedef struct mdbindex MdbIndex;
diff -ruN mdbtools-0.6pre1/include/mdbver.h mdbtools-0.6pre1-ajos
/include/mdbver.h
--- mdbtools-0.6pre1/include/mdbver.h   2004-06-18 05:35:02.000000000 -0400
+++ mdbtools-0.6pre1-ajos/include/mdbver.h      1969-12-31 20:00:
00.000000000 -0400
@@ -1,26 +0,0 @@
-/* MDB Tools - A library for reading MS Access database files
- * Copyright (C) 2000 Brian Bruns
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library 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.
- */
-
-#ifndef _mdbver_h_
-#define _mdbver_h_
-
-#define MDB_FULL_VERSION "mdbtools v0.6pre1"
-#define MDB_VERSION_NO "0.6pre1"
-
-#endif
diff -ruN mdbtools-0.6pre1/src/libmdb/backend.c mdbtools-0.6pre1-ajos
/src/libmdb/backend.c
--- mdbtools-0.6pre1/src/libmdb/backend.c       2004-06-11 09:56:
41.000000000 -0400
+++ mdbtools-0.6pre1-ajos/src/libmdb/backend.c  2006-05-18 11:42:
09.000000000 -0400
@@ -28,7 +28,7 @@
 #endif

 static int is_init;
-static GHashTable *mdb_backends;
+extern GHashTable *mdb_backends;

    /*    Access data types */
 static MdbBackendType mdb_access_types[] = {




-- 
_______________________________
Allann J. O. Silva

"I received the fundamentals of my education in school, but that was not
enough. My real education, the superstructure, the details, the true
architecture, I got out of the public library. For an impoverished child
whose family could not afford to buy books, the library was the open door to
wonder and achievement, and I can never be sufficiently grateful that I had
the wit to charge through that door and make the most of it." (from I.
Asimov, 1994)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.