Commit f87a16d31a39de805828686a18f3eb164a6d657b
Committed by
GitHub
Exists in
master
and in
3 other branches
Merge pull request #4 from andrebreves/develop
Patching library to allow build on apple darwin
Showing
3 changed files
with
28 additions
and
7 deletions
Show diff stats
configure.ac
... | ... | @@ -104,6 +104,20 @@ case "$host" in |
104 | 104 | |
105 | 105 | ;; |
106 | 106 | |
107 | + *-apple-darwin*) | |
108 | + CFLAGS="$CFLAGS -pthread -DCONFDIR=\$(confdir) -DDATADIR=\$(datadir) -DLOCALEDIR=\$(localedir)" | |
109 | + LDFLAGS="$LDFLAGS -pthread" | |
110 | + app_cv_osname="linux" | |
111 | + LOGDIR="/var/log" | |
112 | + DLLEXT=".so" | |
113 | + DLL_LDFLAGS="-shared -Wl,-install_name,\$(@F)" | |
114 | + | |
115 | + INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" | |
116 | + | |
117 | + app_cv_static='yes' | |
118 | + | |
119 | + ;; | |
120 | + | |
107 | 121 | *) |
108 | 122 | CFLAGS="$CFLAGS -pthread -DCONFDIR=\$(confdir) -DDATADIR=\$(datadir) -DLOCALEDIR=\$(localedir)" |
109 | 123 | LDFLAGS="$LDFLAGS -pthread" |
... | ... | @@ -217,6 +231,10 @@ AC_CHECK_HEADER(libintl.h, [ |
217 | 231 | INTL_LIBS="-lintl" |
218 | 232 | ;; |
219 | 233 | |
234 | + *-apple-darwin*) | |
235 | + INTL_LIBS="-lintl" | |
236 | + ;; | |
237 | + | |
220 | 238 | *) |
221 | 239 | INTL_LIBS="" |
222 | 240 | |
... | ... | @@ -277,7 +295,7 @@ rm -f conftest.$ac_objext conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl |
277 | 295 | ])# GLIB_CHECK_COMPILE_WARNINGS |
278 | 296 | |
279 | 297 | AC_MSG_CHECKING(for GNUC visibility attribute) |
280 | -GLIB_CHECK_COMPILE_WARNINGS([ | |
298 | +GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[ | |
281 | 299 | void |
282 | 300 | __attribute__ ((visibility ("hidden"))) |
283 | 301 | f_hidden (void) |
... | ... | @@ -306,7 +324,7 @@ int main (int argc, char **argv) |
306 | 324 | f_default(); |
307 | 325 | return 0; |
308 | 326 | } |
309 | -],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no) | |
327 | +]])],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no) | |
310 | 328 | AC_MSG_RESULT($g_have_gnuc_visibility) |
311 | 329 | if test x$g_have_gnuc_visibility = xyes; then |
312 | 330 | AC_DEFINE(HAVE_GNUC_VISIBILITY, 1, [supports GCC visibility attributes]) |
... | ... | @@ -510,7 +528,7 @@ dnl Check for headers |
510 | 528 | dnl --------------------------------------------------------------------------- |
511 | 529 | |
512 | 530 | AC_CHECK_HEADER(malloc.h, AC_DEFINE(HAVE_MALLOC_H,,[do we have malloc.h?])) |
513 | -AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG,,[do we have malloc.h?])) | |
531 | +AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG,,[do we have syslog.h?])) | |
514 | 532 | |
515 | 533 | AC_CHECK_FUNCS(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) ) |
516 | 534 | AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) ) | ... | ... |
src/core/host.c
src/core/iocalls.c
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | static void (*set_poll_state)(H3270 *session, void *id, int enabled) |
94 | 94 | = internal_set_poll_state; |
95 | 95 | |
96 | - static int (*wait)(H3270 *session, int seconds) | |
96 | + static int (*wait_callback)(H3270 *session, int seconds) | |
97 | 97 | = internal_wait; |
98 | 98 | |
99 | 99 | static int (*event_dispatcher)(H3270 *session,int wait) |
... | ... | @@ -454,7 +454,7 @@ LIB3270_EXPORT int lib3270_register_io_controller(const LIB3270_IO_CONTROLLER *c |
454 | 454 | lib3270_register_fd_handlers(cbk->add_poll,cbk->remove_poll); |
455 | 455 | |
456 | 456 | if(cbk->Wait) |
457 | - wait = cbk->Wait; | |
457 | + wait_callback = cbk->Wait; | |
458 | 458 | |
459 | 459 | if(cbk->event_dispatcher) |
460 | 460 | event_dispatcher = cbk->event_dispatcher; |
... | ... | @@ -480,7 +480,7 @@ LIB3270_EXPORT void lib3270_main_iterate(H3270 *hSession, int block) |
480 | 480 | |
481 | 481 | LIB3270_EXPORT int lib3270_wait(H3270 *hSession, int seconds) |
482 | 482 | { |
483 | - wait(hSession,seconds); | |
483 | + wait_callback(hSession,seconds); | |
484 | 484 | return 0; |
485 | 485 | } |
486 | 486 | ... | ... |