Commit 4b376e26abe74c5cffd6a66c02179d06dff08429
1 parent
1aa06f8c
Exists in
master
and in
3 other branches
Cretating include dir and files based on operating system.
Showing
22 changed files
with
243 additions
and
34 deletions
Show diff stats
Makefile.in
@@ -107,12 +107,14 @@ DEPENDS= \ | @@ -107,12 +107,14 @@ DEPENDS= \ | ||
107 | Makefile \ | 107 | Makefile \ |
108 | src/include/*.h \ | 108 | src/include/*.h \ |
109 | src/include/lib3270/*.h \ | 109 | src/include/lib3270/*.h \ |
110 | + src/include/@OSNAME@/lib3270/*.h \ | ||
110 | $(BASEDIR)/src/include/lib3270/actions.h | 111 | $(BASEDIR)/src/include/lib3270/actions.h |
111 | 112 | ||
112 | CFLAGS= \ | 113 | CFLAGS= \ |
113 | @CFLAGS@ \ | 114 | @CFLAGS@ \ |
114 | -g \ | 115 | -g \ |
115 | -I$(BASEDIR)/src/include \ | 116 | -I$(BASEDIR)/src/include \ |
117 | + -I$(BASEDIR)/src/include/@OSNAME@ \ | ||
116 | @LIBSSL_CFLAGS@ \ | 118 | @LIBSSL_CFLAGS@ \ |
117 | @LDAP_CFLAGS@ \ | 119 | @LDAP_CFLAGS@ \ |
118 | @LIBCURL_CFLAGS@ | 120 | @LIBCURL_CFLAGS@ |
@@ -323,7 +325,7 @@ install-dev: \ | @@ -323,7 +325,7 @@ install-dev: \ | ||
323 | @mkdir -p $(DESTDIR)$(includedir)/lib3270 | 325 | @mkdir -p $(DESTDIR)$(includedir)/lib3270 |
324 | 326 | ||
325 | @$(INSTALL_DATA) \ | 327 | @$(INSTALL_DATA) \ |
326 | - src/include/lib3270/*.h \ | 328 | + src/include/@OSNAME@/lib3270/*.h \ |
327 | $(DESTDIR)$(includedir)/lib3270 | 329 | $(DESTDIR)$(includedir)/lib3270 |
328 | 330 | ||
329 | @$(INSTALL_DATA) \ | 331 | @$(INSTALL_DATA) \ |
lib3270.cbp
@@ -254,6 +254,8 @@ | @@ -254,6 +254,8 @@ | ||
254 | <Option compilerVar="CC" /> | 254 | <Option compilerVar="CC" /> |
255 | </Unit> | 255 | </Unit> |
256 | <Unit filename="src/include/3270ds.h" /> | 256 | <Unit filename="src/include/3270ds.h" /> |
257 | + <Unit filename="src/include/X11keysym.h" /> | ||
258 | + <Unit filename="src/include/action_table.h" /> | ||
257 | <Unit filename="src/include/ansic.h" /> | 259 | <Unit filename="src/include/ansic.h" /> |
258 | <Unit filename="src/include/arpa_telnet.h" /> | 260 | <Unit filename="src/include/arpa_telnet.h" /> |
259 | <Unit filename="src/include/array.h" /> | 261 | <Unit filename="src/include/array.h" /> |
@@ -269,6 +271,7 @@ | @@ -269,6 +271,7 @@ | ||
269 | <Unit filename="src/include/hostc.h" /> | 271 | <Unit filename="src/include/hostc.h" /> |
270 | <Unit filename="src/include/internals.h" /> | 272 | <Unit filename="src/include/internals.h" /> |
271 | <Unit filename="src/include/kybdc.h" /> | 273 | <Unit filename="src/include/kybdc.h" /> |
274 | + <Unit filename="src/include/lib3270++.h" /> | ||
272 | <Unit filename="src/include/lib3270.h" /> | 275 | <Unit filename="src/include/lib3270.h" /> |
273 | <Unit filename="src/include/lib3270/actions.h" /> | 276 | <Unit filename="src/include/lib3270/actions.h" /> |
274 | <Unit filename="src/include/lib3270/charset.h" /> | 277 | <Unit filename="src/include/lib3270/charset.h" /> |
@@ -284,7 +287,9 @@ | @@ -284,7 +287,9 @@ | ||
284 | <Unit filename="src/include/lib3270/toggle.h" /> | 287 | <Unit filename="src/include/lib3270/toggle.h" /> |
285 | <Unit filename="src/include/lib3270/trace.h" /> | 288 | <Unit filename="src/include/lib3270/trace.h" /> |
286 | <Unit filename="src/include/linkedlist.h" /> | 289 | <Unit filename="src/include/linkedlist.h" /> |
290 | + <Unit filename="src/include/linux/lib3270/os.h" /> | ||
287 | <Unit filename="src/include/localdefs.h" /> | 291 | <Unit filename="src/include/localdefs.h" /> |
292 | + <Unit filename="src/include/macos/lib3270/os.h" /> | ||
288 | <Unit filename="src/include/networking.h" /> | 293 | <Unit filename="src/include/networking.h" /> |
289 | <Unit filename="src/include/popupsc.h" /> | 294 | <Unit filename="src/include/popupsc.h" /> |
290 | <Unit filename="src/include/proxyc.h" /> | 295 | <Unit filename="src/include/proxyc.h" /> |
@@ -305,6 +310,8 @@ | @@ -305,6 +310,8 @@ | ||
305 | <Unit filename="src/include/utilc.h" /> | 310 | <Unit filename="src/include/utilc.h" /> |
306 | <Unit filename="src/include/w3miscc.h" /> | 311 | <Unit filename="src/include/w3miscc.h" /> |
307 | <Unit filename="src/include/widec.h" /> | 312 | <Unit filename="src/include/widec.h" /> |
313 | + <Unit filename="src/include/windows/lib3270/os.h" /> | ||
314 | + <Unit filename="src/include/windows/lib3270/win32.h" /> | ||
308 | <Unit filename="src/include/winversc.h" /> | 315 | <Unit filename="src/include/winversc.h" /> |
309 | <Unit filename="src/include/xioc.h" /> | 316 | <Unit filename="src/include/xioc.h" /> |
310 | <Unit filename="src/include/xl.h" /> | 317 | <Unit filename="src/include/xl.h" /> |
src/core/iocalls.c
@@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
36 | #include "telnetc.h" | 36 | #include "telnetc.h" |
37 | #include "utilc.h" | 37 | #include "utilc.h" |
38 | #include "kybdc.h" | 38 | #include "kybdc.h" |
39 | +#include <lib3270/os.h> | ||
39 | 40 | ||
40 | #if defined(_WIN32) | 41 | #if defined(_WIN32) |
41 | #include <ws2tcpip.h> | 42 | #include <ws2tcpip.h> |
@@ -45,7 +46,6 @@ | @@ -45,7 +46,6 @@ | ||
45 | #include <sys/ioctl.h> | 46 | #include <sys/ioctl.h> |
46 | #include <netinet/in.h> | 47 | #include <netinet/in.h> |
47 | #include <netdb.h> | 48 | #include <netdb.h> |
48 | - #include <unistd.h> | ||
49 | #include <fcntl.h> | 49 | #include <fcntl.h> |
50 | #endif | 50 | #endif |
51 | 51 |
src/core/linux/connect.c
@@ -39,7 +39,6 @@ | @@ -39,7 +39,6 @@ | ||
39 | #include <sys/ioctl.h> | 39 | #include <sys/ioctl.h> |
40 | #include <netinet/in.h> | 40 | #include <netinet/in.h> |
41 | #include <netdb.h> | 41 | #include <netdb.h> |
42 | -#include <unistd.h> | ||
43 | #include <fcntl.h> | 42 | #include <fcntl.h> |
44 | 43 | ||
45 | #include <stdlib.h> | 44 | #include <stdlib.h> |
@@ -53,6 +52,7 @@ | @@ -53,6 +52,7 @@ | ||
53 | #include <lib3270/internals.h> | 52 | #include <lib3270/internals.h> |
54 | #include <lib3270/log.h> | 53 | #include <lib3270/log.h> |
55 | #include <lib3270/trace.h> | 54 | #include <lib3270/trace.h> |
55 | +#include <lib3270/os.h> | ||
56 | #include <networking.h> | 56 | #include <networking.h> |
57 | //#include <fcntl.h> | 57 | //#include <fcntl.h> |
58 | #include <poll.h> | 58 | #include <poll.h> |
src/core/linux/util.c
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | #include <config.h> | 36 | #include <config.h> |
37 | #include <stdarg.h> | 37 | #include <stdarg.h> |
38 | #include <internals.h> | 38 | #include <internals.h> |
39 | -#include <unistd.h> | 39 | +#include <lib3270/os.h> |
40 | 40 | ||
41 | static char * concat(char *path, const char *name, size_t *length) | 41 | static char * concat(char *path, const char *name, size_t *length) |
42 | { | 42 | { |
src/core/telnet.c
src/core/windows/connect.c
@@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
32 | #include <winsock2.h> | 32 | #include <winsock2.h> |
33 | #include <windows.h> | 33 | #include <windows.h> |
34 | #include <ws2tcpip.h> | 34 | #include <ws2tcpip.h> |
35 | +#include <lib3270/win32.h> | ||
35 | 36 | ||
36 | #include <internals.h> | 37 | #include <internals.h> |
37 | #include <lib3270/log.h> | 38 | #include <lib3270/log.h> |
src/core/windows/event_dispatcher.c
@@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
36 | #include <sys/time.h> | 36 | #include <sys/time.h> |
37 | #include <sys/types.h> | 37 | #include <sys/types.h> |
38 | #include <lib3270/log.h> | 38 | #include <lib3270/log.h> |
39 | +#include <lib3270/win32.h> | ||
39 | 40 | ||
40 | #define TN (timeout_t *)NULL | 41 | #define TN (timeout_t *)NULL |
41 | 42 |
src/core/windows/http.c
@@ -42,6 +42,7 @@ | @@ -42,6 +42,7 @@ | ||
42 | #include <lib3270/trace.h> | 42 | #include <lib3270/trace.h> |
43 | #include <winhttp.h> | 43 | #include <winhttp.h> |
44 | #include <utilc.h> | 44 | #include <utilc.h> |
45 | +#include <lib3270/win32.h> | ||
45 | 46 | ||
46 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 47 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
47 | 48 |
src/core/windows/util.c
src/include/internals.h
@@ -40,6 +40,7 @@ | @@ -40,6 +40,7 @@ | ||
40 | #include <lib3270/actions.h> | 40 | #include <lib3270/actions.h> |
41 | #include <lib3270/popup.h> | 41 | #include <lib3270/popup.h> |
42 | #include <networking.h> | 42 | #include <networking.h> |
43 | +#include <lib3270/os.h> | ||
43 | 44 | ||
44 | #if defined(HAVE_LIBSSL) | 45 | #if defined(HAVE_LIBSSL) |
45 | #include <openssl/ssl.h> | 46 | #include <openssl/ssl.h> |
@@ -100,7 +101,6 @@ | @@ -100,7 +101,6 @@ | ||
100 | 101 | ||
101 | #else | 102 | #else |
102 | 103 | ||
103 | - #include <unistd.h> /* Unix system calls */ | ||
104 | #include <sys/time.h> /* System time-related data types */ | 104 | #include <sys/time.h> /* System time-related data types */ |
105 | 105 | ||
106 | #endif // _WIN32 | 106 | #endif // _WIN32 |
src/include/lib3270.h
@@ -1573,32 +1573,6 @@ | @@ -1573,32 +1573,6 @@ | ||
1573 | 1573 | ||
1574 | LIB3270_EXPORT int lib3270_set_as400(H3270 *hSession, int on); | 1574 | LIB3270_EXPORT int lib3270_set_as400(H3270 *hSession, int on); |
1575 | 1575 | ||
1576 | -#ifdef _WIN32 | ||
1577 | - LIB3270_EXPORT const char * lib3270_win32_strerror(int e); | ||
1578 | - LIB3270_EXPORT const char * lib3270_win32_local_charset(void); | ||
1579 | - LIB3270_EXPORT LSTATUS lib3270_win32_create_regkey(LPCSTR lpSubKey, REGSAM samDesired, PHKEY phkResult); | ||
1580 | - LIB3270_EXPORT DWORD lib3270_win32_get_dword(HKEY hKey, const char *name, DWORD def); | ||
1581 | - | ||
1582 | - /** | ||
1583 | - * @brief Translate windows error code. | ||
1584 | - * | ||
1585 | - * @param lasterror Windows error code (from GetLastError()). | ||
1586 | - * | ||
1587 | - * @return String with translated message (release it with lib3270_free). | ||
1588 | - * | ||
1589 | - */ | ||
1590 | - LIB3270_EXPORT char * lib3270_win32_translate_error_code(int lasterror); | ||
1591 | - | ||
1592 | - /** | ||
1593 | - * @brief Get lib3270's installation path. | ||
1594 | - * | ||
1595 | - * @return Full path for the lib3270 installation path (release it with lib3270_free) | ||
1596 | - * | ||
1597 | - */ | ||
1598 | - LIB3270_EXPORT char * lib3270_get_installation_path(); | ||
1599 | - | ||
1600 | -#endif // WIn32 | ||
1601 | - | ||
1602 | /** | 1576 | /** |
1603 | * @brief Build filename on application data dir. | 1577 | * @brief Build filename on application data dir. |
1604 | * | 1578 | * |
src/include/lib3270/internals.h
@@ -0,0 +1,43 @@ | @@ -0,0 +1,43 @@ | ||
1 | +/* | ||
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | + * | ||
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | + * | ||
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | + * Free Software Foundation. | ||
11 | + * | ||
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | + * obter mais detalhes. | ||
16 | + * | ||
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | + * | ||
21 | + * Este programa está nomeado como lib3270.h e possui - linhas de código. | ||
22 | + * | ||
23 | + * Contatos: | ||
24 | + * | ||
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | + * | ||
28 | + */ | ||
29 | + | ||
30 | + /** | ||
31 | + * @brief TN3270 API linux definitions. | ||
32 | + * | ||
33 | + * @author perry.werneck@gmail.com | ||
34 | + * | ||
35 | + */ | ||
36 | + | ||
37 | +#ifndef LIB3270_OS_H_INCLUDED | ||
38 | + | ||
39 | + #define LIB3270_OS_H_INCLUDED 1 | ||
40 | + | ||
41 | + #include <unistd.h> | ||
42 | + | ||
43 | +#endif // LIB3270_OS_H_INCLUDED |
@@ -0,0 +1,43 @@ | @@ -0,0 +1,43 @@ | ||
1 | +/* | ||
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | + * | ||
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | + * | ||
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | + * Free Software Foundation. | ||
11 | + * | ||
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | + * obter mais detalhes. | ||
16 | + * | ||
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | + * | ||
21 | + * Este programa está nomeado como lib3270.h e possui - linhas de código. | ||
22 | + * | ||
23 | + * Contatos: | ||
24 | + * | ||
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | + * | ||
28 | + */ | ||
29 | + | ||
30 | + /** | ||
31 | + * @brief TN3270 API MAC definitions. | ||
32 | + * | ||
33 | + * @author perry.werneck@gmail.com | ||
34 | + * | ||
35 | + */ | ||
36 | + | ||
37 | +#ifndef LIB3270_OS_H_INCLUDED | ||
38 | + | ||
39 | + #define LIB3270_OS_H_INCLUDED 1 | ||
40 | + | ||
41 | + #include <unistd.h> | ||
42 | + | ||
43 | +#endif // LIB3270_OS_H_INCLUDED |
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +/* | ||
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | + * | ||
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | + * | ||
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | + * Free Software Foundation. | ||
11 | + * | ||
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | + * obter mais detalhes. | ||
16 | + * | ||
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | + * | ||
21 | + * Este programa está nomeado como lib3270.h e possui - linhas de código. | ||
22 | + * | ||
23 | + * Contatos: | ||
24 | + * | ||
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | + * | ||
28 | + */ | ||
29 | + | ||
30 | + /** | ||
31 | + * @brief TN3270 API windows definitions. | ||
32 | + * | ||
33 | + * @author perry.werneck@gmail.com | ||
34 | + * | ||
35 | + */ | ||
36 | + | ||
37 | +#ifndef LIB3270_OS_H_INCLUDED | ||
38 | + | ||
39 | + #define LIB3270_OS_H_INCLUDED 1 | ||
40 | + | ||
41 | + #include <winsock2.h> | ||
42 | + #include <windows.h> | ||
43 | + | ||
44 | +#endif // LIB3270_OS_H_INCLUDED |
@@ -0,0 +1,78 @@ | @@ -0,0 +1,78 @@ | ||
1 | +/* | ||
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | + * | ||
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | + * | ||
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | + * Free Software Foundation. | ||
11 | + * | ||
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | + * obter mais detalhes. | ||
16 | + * | ||
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | + * | ||
21 | + * Este programa está nomeado como lib3270.h e possui - linhas de código. | ||
22 | + * | ||
23 | + * Contatos: | ||
24 | + * | ||
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | + * | ||
28 | + */ | ||
29 | + | ||
30 | + /** | ||
31 | + * @brief TN3270 API windows definitions. | ||
32 | + * | ||
33 | + * @author perry.werneck@gmail.com | ||
34 | + * | ||
35 | + */ | ||
36 | + | ||
37 | +#ifndef LIB3270_WIN32_H_INCLUDED | ||
38 | + | ||
39 | + #define LIB3270_WIN32_H_INCLUDED 1 | ||
40 | + | ||
41 | + #include <winsock2.h> | ||
42 | + #include <windows.h> | ||
43 | + #include <lib3270.h> | ||
44 | + | ||
45 | +#ifdef __cplusplus | ||
46 | + extern "C" { | ||
47 | +#endif | ||
48 | + | ||
49 | + LIB3270_EXPORT const char * lib3270_win32_strerror(int e); | ||
50 | + LIB3270_EXPORT const char * lib3270_win32_local_charset(void); | ||
51 | + LIB3270_EXPORT LSTATUS lib3270_win32_create_regkey(LPCSTR lpSubKey, REGSAM samDesired, PHKEY phkResult); | ||
52 | + LIB3270_EXPORT DWORD lib3270_win32_get_dword(HKEY hKey, const char *name, DWORD def); | ||
53 | + | ||
54 | + /** | ||
55 | + * @brief Translate windows error code. | ||
56 | + * | ||
57 | + * @param lasterror Windows error code (from GetLastError()). | ||
58 | + * | ||
59 | + * @return String with translated message (release it with lib3270_free). | ||
60 | + * | ||
61 | + */ | ||
62 | + LIB3270_EXPORT char * lib3270_win32_translate_error_code(int lasterror); | ||
63 | + | ||
64 | + /** | ||
65 | + * @brief Get lib3270's installation path. | ||
66 | + * | ||
67 | + * @return Full path for the lib3270 installation path (release it with lib3270_free) | ||
68 | + * | ||
69 | + */ | ||
70 | + LIB3270_EXPORT char * lib3270_get_installation_path(); | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | +#ifdef __cplusplus | ||
75 | + } | ||
76 | +#endif | ||
77 | + | ||
78 | +#endif // LIB3270_WIN32_H_INCLUDED |
src/network_modules/openssl/context.c
@@ -39,6 +39,10 @@ | @@ -39,6 +39,10 @@ | ||
39 | 39 | ||
40 | #include "private.h" | 40 | #include "private.h" |
41 | 41 | ||
42 | +#ifdef _WIN32 | ||
43 | + #include <lib3270/win32.h> | ||
44 | +#endif // _WIN32 | ||
45 | + | ||
42 | #include <openssl/err.h> | 46 | #include <openssl/err.h> |
43 | #include <openssl/x509_vfy.h> | 47 | #include <openssl/x509_vfy.h> |
44 | 48 |
src/network_modules/openssl/private.h
@@ -37,13 +37,13 @@ | @@ -37,13 +37,13 @@ | ||
37 | #include <winsock2.h> | 37 | #include <winsock2.h> |
38 | #include <windows.h> | 38 | #include <windows.h> |
39 | #else | 39 | #else |
40 | - #include <unistd.h> | ||
41 | #include <fcntl.h> | 40 | #include <fcntl.h> |
42 | #endif // _WIN32 | 41 | #endif // _WIN32 |
43 | 42 | ||
44 | #include <lib3270.h> | 43 | #include <lib3270.h> |
45 | #include <lib3270/log.h> | 44 | #include <lib3270/log.h> |
46 | #include <lib3270/popup.h> | 45 | #include <lib3270/popup.h> |
46 | + #include <lib3270/os.h> | ||
47 | #include <array.h> | 47 | #include <array.h> |
48 | #include <internals.h> | 48 | #include <internals.h> |
49 | #include <networking.h> | 49 | #include <networking.h> |
src/network_modules/tools.c
@@ -38,6 +38,9 @@ | @@ -38,6 +38,9 @@ | ||
38 | #include <internals.h> | 38 | #include <internals.h> |
39 | #include <networking.h> | 39 | #include <networking.h> |
40 | #include <fcntl.h> | 40 | #include <fcntl.h> |
41 | + #ifdef _WIN32 | ||
42 | + #include <lib3270/win32.h> | ||
43 | + #endif // _WIN32 | ||
41 | 44 | ||
42 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 45 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
43 | 46 |
src/ssl/notify.c
@@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
37 | #include <internals.h> | 37 | #include <internals.h> |
38 | #include <lib3270/log.h> | 38 | #include <lib3270/log.h> |
39 | #include <lib3270/popup.h> | 39 | #include <lib3270/popup.h> |
40 | +#include <lib3270/win32.h> | ||
40 | 41 | ||
41 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 42 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
42 | 43 |
src/testprogram/testprogram.c
@@ -42,6 +42,10 @@ | @@ -42,6 +42,10 @@ | ||
42 | #include <lib3270/properties.h> | 42 | #include <lib3270/properties.h> |
43 | #include <lib3270/charset.h> | 43 | #include <lib3270/charset.h> |
44 | 44 | ||
45 | +#ifdef _WIN32 | ||
46 | + #include <lib3270/win32.h> | ||
47 | +#endif // _WIN32 | ||
48 | + | ||
45 | #define MAX_ARGS 10 | 49 | #define MAX_ARGS 10 |
46 | 50 | ||
47 | const char *trace_file = "test.trace"; | 51 | const char *trace_file = "test.trace"; |