Commit 9e96ab28a3656d115c1a75546e55367d99405ada
1 parent
0aaa86f4
Exists in
master
and in
5 other branches
Ajustes para compilação windows.
Showing
5 changed files
with
13 additions
and
4 deletions
Show diff stats
configure.ac
@@ -90,7 +90,7 @@ case "$host" in | @@ -90,7 +90,7 @@ case "$host" in | ||
90 | RLS_CFLAGS="-DNDEBUG=1" | 90 | RLS_CFLAGS="-DNDEBUG=1" |
91 | 91 | ||
92 | CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" | 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 | AC_CONFIG_FILES(win/makegtkruntime.sh) | 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,6 +314,7 @@ AC_CHECK_HEADER(malloc.h, AC_DEFINE(HAVE_MALLOC_H,,[do we have malloc.h?])) | ||
314 | AC_CHECK_FUNCS(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) ) | 314 | AC_CHECK_FUNCS(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) ) |
315 | AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) ) | 315 | AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) ) |
316 | AC_CHECK_FUNC(strtok_r, AC_DEFINE(HAVE_STRTOK_R) ) | 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 | PKG_CHECK_EXISTS | 319 | PKG_CHECK_EXISTS |
319 | 320 |
src/include/lib3270/config.h.in
src/lib3270/Makefile.in
@@ -76,7 +76,7 @@ HOST_CC=@HOST_CC@ | @@ -76,7 +76,7 @@ HOST_CC=@HOST_CC@ | ||
76 | LD=@CC@ | 76 | LD=@CC@ |
77 | 77 | ||
78 | CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ @LIBSSL_CFLAGS@ | 78 | CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ @LIBSSL_CFLAGS@ |
79 | -LIBS=@LIBS@ @LIBSSL_LIBS@ | 79 | +LIBS=@LIBS@ @LIBSSL_LIBS@ @LIBICONV@ |
80 | LDFLAGS=@LDFLAGS@ | 80 | LDFLAGS=@LDFLAGS@ |
81 | 81 | ||
82 | #---[ Rules ]---------------------------------------------------------------------------- | 82 | #---[ Rules ]---------------------------------------------------------------------------- |
src/lib3270/util.c
@@ -113,6 +113,7 @@ int get_version_info(void) | @@ -113,6 +113,7 @@ int get_version_info(void) | ||
113 | } | 113 | } |
114 | 114 | ||
115 | // Convert a network address to a string. | 115 | // Convert a network address to a string. |
116 | +#ifndef HAVE_INET_NTOP | ||
116 | const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt) | 117 | const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt) |
117 | { | 118 | { |
118 | union { | 119 | union { |
@@ -150,6 +151,7 @@ const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt) | @@ -150,6 +151,7 @@ const char * inet_ntop(int af, const void *src, char *dst, socklen_t cnt) | ||
150 | 151 | ||
151 | return dst; | 152 | return dst; |
152 | } | 153 | } |
154 | +#endif // HAVE_INET_NTOP | ||
153 | 155 | ||
154 | // Decode a Win32 error number. | 156 | // Decode a Win32 error number. |
155 | LIB3270_EXPORT const char * lib3270_win32_strerror(int e) | 157 | LIB3270_EXPORT const char * lib3270_win32_strerror(int e) |
src/lib3270/w3miscc.h
@@ -16,7 +16,12 @@ | @@ -16,7 +16,12 @@ | ||
16 | * Miscellaneous Win32 functions. | 16 | * Miscellaneous Win32 functions. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | -#if defined(_WIN32) | 19 | + #include <lib3270/config.h> |
20 | + | ||
21 | + #ifndef HAVE_INET_NTOP | ||
20 | LIB3270_INTERNAL const char *inet_ntop(int af, const void *src, char *dst,socklen_t cnt); | 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 | LIB3270_INTERNAL const char *win32_strerror(int e); | 26 | LIB3270_INTERNAL const char *win32_strerror(int e); |
22 | -#endif | 27 | + #endif // WIN32 |