Commit 9e96ab28a3656d115c1a75546e55367d99405ada

Authored by Perry Werneck
1 parent 0aaa86f4

Ajustes para compilação windows.

configure.ac
... ... @@ -90,7 +90,7 @@ case "$host" in
90 90 RLS_CFLAGS="-DNDEBUG=1"
91 91  
92 92 CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600"
93   - LIBS="$LIBS -lws2_32 -lntdll -lwtsapi32"
  93 + LIBS="$LIBS -lws2_32 -lntdll -lwtsapi32 -lintl"
94 94  
95 95 AC_CONFIG_FILES(win/makegtkruntime.sh)
96 96  
... ... @@ -314,6 +314,7 @@ AC_CHECK_HEADER(malloc.h, AC_DEFINE(HAVE_MALLOC_H,,[do we have malloc.h?]))
314 314 AC_CHECK_FUNCS(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) )
315 315 AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) )
316 316 AC_CHECK_FUNC(strtok_r, AC_DEFINE(HAVE_STRTOK_R) )
  317 +AC_CHECK_FUNC(inet_ntop, AC_DEFINE(HAVE_INET_NTOP) )
317 318  
318 319 PKG_CHECK_EXISTS
319 320  
... ...
src/include/lib3270/config.h.in
... ... @@ -44,6 +44,7 @@
44 44 #undef HAVE_SYSLOG
45 45 #undef HAVE_DBUS
46 46 #undef HAVE_VASPRINTF
  47 + #undef HAVE_INET_NTOP
47 48  
48 49 #undef HAVE_ICONV
49 50 #undef ICONV_CONST
... ...
src/lib3270/Makefile.in
... ... @@ -76,7 +76,7 @@ HOST_CC=@HOST_CC@
76 76 LD=@CC@
77 77  
78 78 CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ @LIBSSL_CFLAGS@
79   -LIBS=@LIBS@ @LIBSSL_LIBS@
  79 +LIBS=@LIBS@ @LIBSSL_LIBS@ @LIBICONV@
80 80 LDFLAGS=@LDFLAGS@
81 81  
82 82 #---[ Rules ]----------------------------------------------------------------------------
... ...
src/lib3270/util.c
... ... @@ -113,6 +113,7 @@ int get_version_info(void)
113 113 }
114 114  
115 115 // Convert a network address to a string.
  116 +#ifndef HAVE_INET_NTOP
116 117 const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt)
117 118 {
118 119 union {
... ... @@ -150,6 +151,7 @@ const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt)
150 151  
151 152 return dst;
152 153 }
  154 +#endif // HAVE_INET_NTOP
153 155  
154 156 // Decode a Win32 error number.
155 157 LIB3270_EXPORT const char * lib3270_win32_strerror(int e)
... ...
src/lib3270/w3miscc.h
... ... @@ -16,7 +16,12 @@
16 16 * Miscellaneous Win32 functions.
17 17 */
18 18  
19   -#if defined(_WIN32)
  19 + #include <lib3270/config.h>
  20 +
  21 + #ifndef HAVE_INET_NTOP
20 22 LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt);
  23 + #endif // HAVE_INET_NTOP
  24 +
  25 + #if defined(_WIN32)
21 26 LIB3270_INTERNAL const char *win32_strerror(int e);
22   -#endif
  27 + #endif // WIN32
... ...