[PATCH] Revert to previous ABI
Colin Walters
walters at verbum.org
Sat Apr 14 14:03:59 UTC 2012
Bumping the SONAME just to delete 3 symbols that no one called anyways
is quite simply not worth the pain, given how many low-level modules
consume libffi.
Just keep the symbols around as empty stubs.
---
Makefile.am | 6 +-----
libtool-version | 2 +-
src/debug.c | 12 ++++++++++--
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4a855d7..0e9cabd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -96,11 +96,7 @@ libffi_la_SOURCES = src/prep_cif.c src/types.c \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libffi.pc
-nodist_libffi_la_SOURCES =
-
-if FFI_DEBUG
-nodist_libffi_la_SOURCES += src/debug.c
-endif
+nodist_libffi_la_SOURCES = src/debug.c
if MIPS
nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
diff --git a/libtool-version b/libtool-version
index 95f48c5..b8b80e0 100644
--- a/libtool-version
+++ b/libtool-version
@@ -26,4 +26,4 @@
# release, then set age to 0.
#
# CURRENT:REVISION:AGE
-6:0:0
+5:10:0
diff --git a/src/debug.c b/src/debug.c
index 51dcfcf..ae42afd 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -27,33 +27,41 @@
#include <stdlib.h>
#include <stdio.h>
-/* General debugging routines */
+/* General debugging routines; note these were accidentally
+ * made public, so we keep empty stubs in the case where
+ * we weren't compiled with FFI_DEBUG.
+ */
void ffi_stop_here(void)
{
+#ifdef FFI_DEBUG
/* This function is only useful for debugging purposes.
Place a breakpoint on ffi_stop_here to be notified of
significant events. */
+#endif
}
/* This function should only be called via the FFI_ASSERT() macro */
void ffi_assert(char *expr, char *file, int line)
{
+#ifdef FFI_DEBUG
fprintf(stderr, "ASSERTION FAILURE: %s at %s:%d\n", expr, file, line);
ffi_stop_here();
abort();
+#endif
}
/* Perform a sanity check on an ffi_type structure */
void ffi_type_test(ffi_type *a, char *file, int line)
{
+#ifdef FFI_DEBUG
FFI_ASSERT_AT(a != NULL, file, line);
FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line);
FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line);
FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line);
FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line);
-
+#endif
}
--
1.7.7.6
--=-I6Oh09BJjk+Mk8GSxOuJ--
More information about the devel
mailing list