From 753f11f3881eac51da49c5bb2c2eebc99bd47410 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 28 Apr 2011 14:46:17 +0200 Subject: Use visibility macros instead of symbol map Signed-off-by: Jussi Pakkanen Signed-off-by: Henrik Rydberg --- src/Makefile.am | 5 +++-- src/grail-api.c | 14 +++++++------- src/grail-bits.c | 12 +++++++----- src/grail-event.c | 4 ++-- src/grail-inserter.c | 6 +++--- 5 files changed, 22 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index da1a46e..c344342 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,6 @@ lib_LTLIBRARIES = libutouch-grail.la libutouch_grail_la_LDFLAGS = \ -version-info @LIB_VERSION@ \ - -export-symbols ../utouch-grail.sym \ -lm \ $(MTDEV_LIBS) \ $(EVEMU_LIBS) \ @@ -28,7 +27,9 @@ libutouch_grail_la_SOURCES = \ grail-impl.h \ grail-api.c -AM_CFLAGS = $(CWARNFLAGS) +# These are flags required to properly set up +# the build. -fvisibility requires GCC > 4 (or clang) +AM_CFLAGS = $(CWARNFLAGS) -DBUILDING_GRAIL -fvisibility=hidden INCLUDES = -I$(top_srcdir)/include/ diff --git a/src/grail-api.c b/src/grail-api.c index 5a0beb4..259f5a0 100644 --- a/src/grail-api.c +++ b/src/grail-api.c @@ -34,13 +34,13 @@ #define DIM_FRAMES 100 #define FRAME_RATE 100 -void grail_filter_abs_events(struct grail *ge, int usage) +void GRAIL_PUBLIC grail_filter_abs_events(struct grail *ge, int usage) { struct grail_impl *x = ge->impl; x->filter_abs = usage; } -int grail_open(struct grail *ge, int fd) +int GRAIL_PUBLIC grail_open(struct grail *ge, int fd) { struct grail_impl *x; struct stat fs; @@ -116,7 +116,7 @@ int grail_open(struct grail *ge, int fd) return ret; } -void grail_close(struct grail *ge, int fd) +void GRAIL_PUBLIC grail_close(struct grail *ge, int fd) { struct grail_impl *x = ge->impl; gru_destroy(ge); @@ -131,7 +131,7 @@ void grail_close(struct grail *ge, int fd) ge->impl = 0; } -int grail_idle(struct grail *ge, int fd, int ms) +int GRAIL_PUBLIC grail_idle(struct grail *ge, int fd, int ms) { struct grail_impl *x = ge->impl; if (x->fptest) @@ -141,8 +141,8 @@ int grail_idle(struct grail *ge, int fd, int ms) return 1; } -void grail_get_units(const struct grail *ge, - struct grail_coord *min, struct grail_coord *max) +void GRAIL_PUBLIC grail_get_units(const struct grail *ge, + struct grail_coord *min, struct grail_coord *max) { struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh); min->x = s->min_x; @@ -287,7 +287,7 @@ static int grail_pull_fstest(struct grail *ge, int fd) return count > 0 ? count : -1; } -int grail_pull(struct grail *ge, int fd) +int GRAIL_PUBLIC grail_pull(struct grail *ge, int fd) { struct grail_impl *impl = ge->impl; struct input_event ev; diff --git a/src/grail-bits.c b/src/grail-bits.c index 4c8b941..8ebfb18 100644 --- a/src/grail-bits.c +++ b/src/grail-bits.c @@ -46,19 +46,21 @@ static const int grail_first_set_bit[256] = 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0, }; -void grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) +void GRAIL_PUBLIC grail_mask_set_mask(grail_mask_t *a, const grail_mask_t *b, + int bytes) { while (bytes--) *a++ |= *b++; } -void grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b, int bytes) +void GRAIL_PUBLIC grail_mask_clear_mask(grail_mask_t *a, const grail_mask_t *b, + int bytes) { while (bytes--) *a++ &= ~*b++; } -int grail_mask_count(const grail_mask_t *mask, int bytes) +int GRAIL_PUBLIC grail_mask_count(const grail_mask_t *mask, int bytes) { int count = 0; while (bytes--) @@ -66,7 +68,7 @@ int grail_mask_count(const grail_mask_t *mask, int bytes) return count; } -int grail_mask_get_first(const grail_mask_t *mask, int bytes) +int GRAIL_PUBLIC grail_mask_get_first(const grail_mask_t *mask, int bytes) { int k; for (k = 0; k < bytes; k++) @@ -75,7 +77,7 @@ int grail_mask_get_first(const grail_mask_t *mask, int bytes) return -1; } -int grail_mask_get_next(int i, const grail_mask_t *mask, int bytes) +int GRAIL_PUBLIC grail_mask_get_next(int i, const grail_mask_t *mask, int bytes) { int k = ++i >> 3; if (k < bytes) { diff --git a/src/grail-event.c b/src/grail-event.c index 504ed10..bb75a06 100644 --- a/src/grail-event.c +++ b/src/grail-event.c @@ -118,8 +118,8 @@ void gin_send_event(struct grail *ge, struct slot_state *s, } } -int grail_get_contacts(const struct grail *ge, - struct grail_contact *touch, int max_touch) +int GRAIL_PUBLIC grail_get_contacts(const struct grail *ge, + struct grail_contact *touch, int max_touch) { const struct gesture_inserter *gin = ge->gin; const struct utouch_frame *frame = ge->impl->frame; diff --git a/src/grail-inserter.c b/src/grail-inserter.c index ab81ece..8a10b2e 100644 --- a/src/grail-inserter.c +++ b/src/grail-inserter.c @@ -288,9 +288,9 @@ void gin_gid_end(struct grail *ge, int gid, s->status = GRAIL_STATUS_END; } -void grail_set_bbox(struct grail *ge, - const struct grail_coord *tmin, - const struct grail_coord *tmax) +void GRAIL_PUBLIC grail_set_bbox(struct grail *ge, + const struct grail_coord *tmin, + const struct grail_coord *tmax) { struct utouch_surface *s = utouch_frame_get_surface(ge->impl->fh); -- cgit v1.2.3