summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/patches/04-hide-symbols.diff174
-rw-r--r--debian/patches/series1
-rw-r--r--src/examples/guessconv/Makefile8
-rw-r--r--src/libguess/dfa.c8
-rw-r--r--src/libguess/guess.c6
-rw-r--r--src/libguess/guess_impl.c22
6 files changed, 193 insertions, 26 deletions
diff --git a/debian/patches/04-hide-symbols.diff b/debian/patches/04-hide-symbols.diff
new file mode 100644
index 0000000..2c1d227
--- /dev/null
+++ b/debian/patches/04-hide-symbols.diff
@@ -0,0 +1,174 @@
+Description: Hide symbols internal symbols
+Author: Andrew O. Shadoura <bugzilla@tut.by>
+Bug: http://jira.atheme.org/browse/LG-4
+
+--- a/src/libguess/dfa.c
++++ b/src/libguess/dfa.c
+@@ -1,7 +1,7 @@
+ #include "libguess.h"
+ #include "dfa.h"
+
+-boolean
++boolean __attribute__ ((visibility ("hidden")))
+ dfa_alone(guess_dfa *dfa, guess_dfa *order[])
+ {
+ int i;
+@@ -18,7 +18,7 @@
+ return TRUE;
+ }
+
+-boolean
++boolean __attribute__ ((visibility ("hidden")))
+ dfa_none(guess_dfa *order[])
+ {
+ int i;
+@@ -32,7 +32,7 @@
+ return TRUE;
+ }
+
+-guess_dfa *
++guess_dfa * __attribute__ ((visibility ("hidden")))
+ dfa_top(guess_dfa *order[])
+ {
+ int i;
+@@ -46,7 +46,7 @@
+ return top;
+ }
+
+-const char *
++const char * __attribute__ ((visibility ("hidden")))
+ dfa_process(guess_dfa *order[], int c)
+ {
+ int i;
+diff --git a/src/libguess/guess.c b/src/libguess/guess.c
+--- a/src/libguess/guess.c
++++ b/src/libguess/guess.c
+@@ -2,7 +2,7 @@
+
+ mowgli_patricia_t *guess_impl_list = NULL;
+
+-void strcasecanon(char *str)
++void __attribute__ ((visibility ("hidden"))) strcasecanon(char *str)
+ {
+ while (*str)
+ {
+@@ -11,7 +11,7 @@
+ }
+ }
+
+-static void
++static void __attribute__ ((visibility ("hidden")))
+ guess_impl_register(const char *lang, guess_impl_f impl)
+ {
+ return_if_fail(guess_impl_list != NULL);
+@@ -19,7 +19,7 @@
+ mowgli_patricia_add(guess_impl_list, lang, impl);
+ }
+
+-static void
++static void __attribute__ ((visibility ("hidden")))
+ guess_init(void)
+ {
+ mowgli_init();
+diff --git a/src/libguess/guess_impl.c b/src/libguess/guess_impl.c
+--- a/src/libguess/guess_impl.c
++++ b/src/libguess/guess_impl.c
+@@ -81,7 +81,7 @@
+ return 0;
+ }
+
+-const char *guess_jp(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_jp(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -137,7 +137,7 @@
+ return NULL;
+ }
+
+-const char *guess_tw(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_tw(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -192,7 +192,7 @@
+ return NULL;
+ }
+
+-const char *guess_cn(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_cn(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -250,7 +250,7 @@
+ return NULL;
+ }
+
+-const char *guess_kr(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_kr(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -308,7 +308,7 @@
+ return NULL;
+ }
+
+-const char *guess_ar(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_ar(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -357,7 +357,7 @@
+ return NULL;
+ }
+
+-const char *guess_gr(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_gr(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -406,7 +406,7 @@
+ return NULL;
+ }
+
+-const char *guess_ru(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_ru(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -459,7 +459,7 @@
+ return NULL;
+ }
+
+-const char *guess_hw(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_hw(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -508,7 +508,7 @@
+ return NULL;
+ }
+
+-const char *guess_pl(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_pl(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -557,7 +557,7 @@
+ return NULL;
+ }
+
+-const char *guess_tr(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_tr(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
+@@ -606,7 +606,7 @@
+ return NULL;
+ }
+
+-const char *guess_bl(const char *buf, int buflen)
++const char * __attribute__ ((visibility ("hidden"))) guess_bl(const char *buf, int buflen)
+ {
+ int i;
+ const char *rv = NULL;
diff --git a/debian/patches/series b/debian/patches/series
index 8ce0a1f..cf57d64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
01-fix-typo-on-mowgli-url.hg219e1937b9f5.diff
02-use-proper-format-string.diff
03-use-format.diff
+04-hide-symbols.diff
diff --git a/src/examples/guessconv/Makefile b/src/examples/guessconv/Makefile
deleted file mode 100644
index fa79ac3..0000000
--- a/src/examples/guessconv/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-PROG = guessconv${PROG_SUFFIX}
-SRCS = guessconv.c
-
-include ../../../buildsys.mk
-include ../../../extra.mk
-
-CPPFLAGS += ${MOWGLI_CFLAGS} -I../../libguess
-LIBS += ${MOWGLI_LIBS} -L../../libguess -lguess
diff --git a/src/libguess/dfa.c b/src/libguess/dfa.c
index a7d5943..ef97ffe 100644
--- a/src/libguess/dfa.c
+++ b/src/libguess/dfa.c
@@ -1,7 +1,7 @@
#include "libguess.h"
#include "dfa.h"
-boolean
+boolean __attribute__ ((visibility ("hidden")))
dfa_alone(guess_dfa *dfa, guess_dfa *order[])
{
int i;
@@ -18,7 +18,7 @@ dfa_alone(guess_dfa *dfa, guess_dfa *order[])
return TRUE;
}
-boolean
+boolean __attribute__ ((visibility ("hidden")))
dfa_none(guess_dfa *order[])
{
int i;
@@ -32,7 +32,7 @@ dfa_none(guess_dfa *order[])
return TRUE;
}
-guess_dfa *
+guess_dfa * __attribute__ ((visibility ("hidden")))
dfa_top(guess_dfa *order[])
{
int i;
@@ -46,7 +46,7 @@ dfa_top(guess_dfa *order[])
return top;
}
-const char *
+const char * __attribute__ ((visibility ("hidden")))
dfa_process(guess_dfa *order[], int c)
{
int i;
diff --git a/src/libguess/guess.c b/src/libguess/guess.c
index 2c55d95..8b8c595 100644
--- a/src/libguess/guess.c
+++ b/src/libguess/guess.c
@@ -2,7 +2,7 @@
mowgli_patricia_t *guess_impl_list = NULL;
-void strcasecanon(char *str)
+void __attribute__ ((visibility ("hidden"))) strcasecanon(char *str)
{
while (*str)
{
@@ -11,7 +11,7 @@ void strcasecanon(char *str)
}
}
-static void
+static void __attribute__ ((visibility ("hidden")))
guess_impl_register(const char *lang, guess_impl_f impl)
{
return_if_fail(guess_impl_list != NULL);
@@ -19,7 +19,7 @@ guess_impl_register(const char *lang, guess_impl_f impl)
mowgli_patricia_add(guess_impl_list, lang, impl);
}
-static void
+static void __attribute__ ((visibility ("hidden")))
guess_init(void)
{
mowgli_init();
diff --git a/src/libguess/guess_impl.c b/src/libguess/guess_impl.c
index 0a1b83f..50a50f7 100644
--- a/src/libguess/guess_impl.c
+++ b/src/libguess/guess_impl.c
@@ -81,7 +81,7 @@ int libguess_validate_utf8(const char *buf, int buflen)
return 0;
}
-const char *guess_jp(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_jp(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -137,7 +137,7 @@ const char *guess_jp(const char *buf, int buflen)
return NULL;
}
-const char *guess_tw(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_tw(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -192,7 +192,7 @@ const char *guess_tw(const char *buf, int buflen)
return NULL;
}
-const char *guess_cn(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_cn(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -250,7 +250,7 @@ const char *guess_cn(const char *buf, int buflen)
return NULL;
}
-const char *guess_kr(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_kr(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -308,7 +308,7 @@ const char *guess_kr(const char *buf, int buflen)
return NULL;
}
-const char *guess_ar(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_ar(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -357,7 +357,7 @@ const char *guess_ar(const char *buf, int buflen)
return NULL;
}
-const char *guess_gr(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_gr(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -406,7 +406,7 @@ const char *guess_gr(const char *buf, int buflen)
return NULL;
}
-const char *guess_ru(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_ru(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -459,7 +459,7 @@ const char *guess_ru(const char *buf, int buflen)
return NULL;
}
-const char *guess_hw(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_hw(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -508,7 +508,7 @@ const char *guess_hw(const char *buf, int buflen)
return NULL;
}
-const char *guess_pl(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_pl(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -557,7 +557,7 @@ const char *guess_pl(const char *buf, int buflen)
return NULL;
}
-const char *guess_tr(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_tr(const char *buf, int buflen)
{
int i;
const char *rv = NULL;
@@ -606,7 +606,7 @@ const char *guess_tr(const char *buf, int buflen)
return NULL;
}
-const char *guess_bl(const char *buf, int buflen)
+const char * __attribute__ ((visibility ("hidden"))) guess_bl(const char *buf, int buflen)
{
int i;
const char *rv = NULL;