aspell/aspell-epmty_file.patch
2012-02-24 21:15:00 +00:00

47 lines
1.4 KiB
Diff

--- common/convert.cpp.orig
+++ common/convert.cpp
@@ -813,6 +813,7 @@ namespace acommon {
{
ToUniLookup lookup;
void decode(const char * in, int size, FilterCharVector & out) const {
+ if (size == 0) return; // if size == 0 then while loop cause SIGSEGV
const char * stop = in + size; // this is OK even if size == -1
while (*in && in != stop) {
out.append(from_utf8(in, stop));
--- Makefile.am.orig
+++ Makefile.am
@@ -29,8 +29,10 @@ lib_LTLIBRARIES = libaspell.la
if PSPELL_COMPATIBILITY
lib_LTLIBRARIES += libpspell.la
+libpspell_la_CXXFLAGS = -fvisibility-inlines-hidden
endif
+libaspell_la_CXXFLAGS = -fvisibility-inlines-hidden
libaspell_la_SOURCES =\
common/cache.cpp\
common/string.cpp\
@@ -194,7 +196,7 @@ libaspell_la_SOURCES +=\
else # not COMPILE_IN_FILTERS
dynamic_optfiles += ${optfiles}
-filter_ldflags = -module -avoid-version
+filter_ldflags = -avoid-version -module -shared -export-dynamic
### Add name of filter library containing your filter. Name always
### must look like lib<filtername>-filter.la see development manual
--- lib5/Makefile.am.orig
+++ lib5/Makefile.am
@@ -1,9 +1,9 @@
-
+AM_CXXFLAGS = -fvisibility-inlines-hidden
if INCREMENTED_SONAME
lib_LTLIBRARIES = libaspell.la
libaspell_la_SOURCES = aspell-dummy.cpp
-libaspell_la_LDFLAGS = -version-info 16:0:1
+libaspell_la_LDFLAGS = -no-undefined -version-info 16:0:1
libaspell_la_LIBADD = ../libaspell.la
if PSPELL_COMPATIBILITY