Commit d2ad2e2089802066087b86d013b2628998ada208
1 parent
bb4d445e
Exists in
master
and in
3 other branches
Ajustes para compilação windows.
Showing
3 changed files
with
10 additions
and
3 deletions
Show diff stats
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 ]---------------------------------------------------------------------------- |
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) |
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 |