]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Make bttest build with restricted lib exports
authorTom Yu <tlyu@mit.edu>
Mon, 8 Aug 2016 13:13:59 +0000 (09:13 -0400)
committerTom Yu <tlyu@mit.edu>
Tue, 16 Aug 2016 19:24:43 +0000 (15:24 -0400)
On platforms that use strict library export lists, the libdb2 btree
debugging program bttest won't build with -DDEBUG or -DSTATISTICS
because some needed functions aren't in the export list.

Add the missing bt_debug.c and mpool.c functions to libdb.exports.
Stub out these functions when built without -DDEBUG or -DSTATISTICS to
avoid unreferenced symbols, because conditionalizing library export
lists isn't easy.

ticket: 8478

src/plugins/kdb/db2/libdb2/btree/bt_debug.c
src/plugins/kdb/db2/libdb2/libdb.exports
src/plugins/kdb/db2/libdb2/mpool/mpool.c
src/plugins/kdb/db2/libdb2/mpool/mpool.h

index b302ca60d376ce8ef852438f3f58d66c7064e0c8..d0bb56e0a13b40d5334e393d648571483e08a124 100644 (file)
@@ -286,6 +286,27 @@ __bt_dpage(dbp, h)
        (void)fflush(tracefp);
        return (0);
 }
+#else
+int
+__bt_dump(DB *dbp)
+{
+       return (0);
+}
+int
+__bt_dmpage(PAGE *h)
+{
+       return (0);
+}
+int
+__bt_dnpage(DB *dbp, db_pgno_t pgno)
+{
+       return (0);
+}
+int
+__bt_dpage(DB *dbp, PAGE *h)
+{
+       return (0);
+}
 #endif
 
 #ifdef STATISTICS
@@ -375,4 +396,10 @@ __bt_stat(dbp)
        (void)fflush(tracefp);
        return (0);
 }
+#else
+int
+__bt_stat(DB *dbp)
+{
+       return (0);
+}
 #endif
index 5dbc2e4389485888b7c677d7806318a3086a61b0..4d3494704a0539825383d9cef1a3cc83815c4f76 100644 (file)
@@ -12,6 +12,10 @@ __kdb2_bt_defcmp
 __kdb2_bt_defpfx
 __kdb2_bt_deleaf
 __kdb2_bt_delete
+__kdb2_bt_dmpage
+__kdb2_bt_dnpage
+__kdb2_bt_dpage
+__kdb2_bt_dump
 __kdb2_bt_fd
 __kdb2_bt_free
 __kdb2_bt_get
@@ -25,6 +29,7 @@ __kdb2_bt_search
 __kdb2_bt_seq
 __kdb2_bt_setcur
 __kdb2_bt_split
+__kdb2_bt_stat
 __kdb2_bt_sync
 __kdb2_call_hash
 __kdb2_cursor_creat
@@ -94,6 +99,7 @@ kdb2_mpool_get
 kdb2_mpool_new
 kdb2_mpool_open
 kdb2_mpool_put
+kdb2_mpool_stat
 kdb2_mpool_sync
 kdb2_nextkey
 kdb2_store
index 7941a9f81c1819a9973aed6407850964c2580f7b..8dcda693ef96f5674c7aabf3e3eba52b9769028a 100644 (file)
@@ -507,4 +507,10 @@ mpool_stat(mp)
        }
        (void)fprintf(stderr, "\n");
 }
+#else
+void
+mpool_stat(mp)
+       MPOOL *mp;
+{
+}
 #endif
index bed5ed3a1cb57bf23f8fb0b0055f9d9157fe9b33..7957df6977dfd5b5998e7bb1cf4d491c82999d08 100644 (file)
@@ -111,7 +111,7 @@ int  mpool_delete __P((MPOOL *, void *));
 int     mpool_put __P((MPOOL *, void *, u_int));
 int     mpool_sync __P((MPOOL *));
 int     mpool_close __P((MPOOL *));
-#ifdef STATISTICS
+
 void    mpool_stat __P((MPOOL *));
-#endif
+
 __END_DECLS