Commit 96d22e4f099f381409c7a7fb64e98813870b1ca4

Authored by Perry Werneck
1 parent e3256b6c
Exists in master and in 1 other branch develop

Delaying load of lib3270 on windows.

client/Makefile.in
... ... @@ -97,6 +97,8 @@ CFLAGS= \
97 97 @LIB3270_CFLAGS@ \
98 98 @DBUS_CFLAGS@
99 99  
  100 +LDFLAGS=@LDFLAGS@
  101 +
100 102 LIBS= \
101 103 @LIBS@ \
102 104 @LIBICONV@ \
... ...
client/sdk/ipc3270-static.pc.in
... ... @@ -6,6 +6,6 @@ includedir=@includedir@
6 6 Name: @PACKAGE_NAME@-static
7 7 Description: @PACKAGE_DESCRIPTION@ (static library)
8 8 Version: @PACKAGE_VERSION@
9   -Libs: -L\@libdir@ -lipc3270-static @LIB3270_LIBS@ @DBUS_LIBS@ @LIBS@
  9 +Libs: -lipc3270-static @LIB3270_LIBS@ @DBUS_LIBS@ @LIBS@
10 10 Cflags: -I@includedir@
11 11  
... ...
client/sdk/ipc3270.pc.in
... ... @@ -6,7 +6,7 @@ includedir=@includedir@
6 6 Name: @PACKAGE_NAME@
7 7 Description: @PACKAGE_DESCRIPTION@
8 8 Version: @PACKAGE_VERSION@
9   -Libs: -L\@libdir@ -lipc3270
  9 +Libs: -lipc3270
10 10 Libs.private: @LIBS@ @LIBICONV@ @INTL_LIBS@ @LIB3270_LIBS@ @DBUS_LIBS@
11 11 Cflags: -I@includedir@
12 12  
... ...
client/src/core/session.cc
... ... @@ -48,7 +48,7 @@
48 48  
49 49 debug("Creating session with ID \"",id,"\"");
50 50  
51   - if(!id) {
  51 + if(!(id && *id)) {
52 52 return new Local::Session();
53 53 }
54 54  
... ...
client/src/testprogram/testprogram.cc
... ... @@ -39,6 +39,7 @@
39 39 #include <getopt.h>
40 40 #include <cstdlib>
41 41 #include <lib3270/ipc.h>
  42 + #include <delayimp.h>
42 43  
43 44 using namespace std;
44 45  
... ... @@ -46,7 +47,7 @@
46 47  
47 48 int main(int argc, char **argv) {
48 49  
49   - const char * session = "pw3270:a";
  50 + const char * session = ""; // "pw3270:a";
50 51  
51 52 #pragma GCC diagnostic push
52 53 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
... ...
common/src/include/config.h.in
... ... @@ -38,6 +38,9 @@
38 38 #undef HAVE_ICONV
39 39 #undef ICONV_CONST
40 40  
  41 + #undef LIB3270_DELAYED
  42 + #undef LIB3270_DYNAMIC
  43 +
41 44 #undef HAVE_VASPRINTF
42 45  
43 46  
... ...
common/src/include/lib3270/ipc.h
... ... @@ -178,7 +178,7 @@
178 178 SELECT_ALL,
179 179 UNSELECT,
180 180 RESELECT,
181   - DELETE,
  181 + CHAR_DELETE,
182 182 DUP,
183 183 FIELDMARK,
184 184 BACKSPACE,
... ... @@ -193,7 +193,6 @@
193 193 WORD_DELETE, ///< @brief Backspaces the cursor until it hits the front of a word (does a ^W).
194 194 FIELD_DELETE, ///< @brief Delete field key (does a ^U).
195 195 SYSREQ
196   -
197 196 };
198 197  
199 198 /// @brief TN3270 Session.
... ...
configure.ac
... ... @@ -79,9 +79,9 @@ DLLPREFIX=&quot;lib&quot;
79 79 case "$host" in
80 80 *-mingw32|*-pc-msys)
81 81 app_cv_osname="windows"
82   - CFLAGS="$CFLAGS -pthread -D_WIN32_WINNT=0x0600"
  82 + CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600"
83 83 LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32"
84   - LDFLAGS="$LDFLAGS -pthread"
  84 + LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
85 85 DLLEXT=".dll"
86 86 DLLPREFIX=""
87 87  
... ... @@ -211,31 +211,31 @@ dnl ---------------------------------------------------------------------------
211 211 dnl Check for LIB3270
212 212 dnl ---------------------------------------------------------------------------
213 213  
214   -AC_ARG_WITH([static-lib3270],
215   - [AS_HELP_STRING([--with-static-lib3270], [Uses static version of lib3270])],
  214 +AC_ARG_WITH([delayed-lib3270],
  215 + [AS_HELP_STRING([--with-delayed-lib3270], [Uses delayed version of lib3270 (WIN32 Only)])],
216 216 [
217   - app_cv_static_lib3270=$withval
  217 + app_cv_delayed_lib3270=$withval
218 218 ],[
219   - app_cv_static_lib3270=auto
  219 + app_cv_delayed_lib3270="auto"
220 220 ])
221 221  
222   -if test "$app_cv_static_lib3270" == "auto"; then
  222 +if test "$app_cv_delayed_lib3270" == "auto"; then
223 223 case "$host" in
224 224 *-mingw32|*-pc-msys)
225   - app_cv_static_lib3270="yes"
  225 + app_cv_delayed_lib3270="yes"
226 226 ;;
227 227  
228 228 *)
229   - app_cv_static_lib3270="no"
  229 + app_cv_delayed_lib3270="no"
230 230  
231 231 esac
232 232  
233 233 fi
234 234  
235   -if test "$app_cv_static_lib3270" == "yes"; then
236   - PKG_CHECK_MODULES( [LIB3270], [lib3270-static], AC_DEFINE(HAVE_LIB3270), AC_MSG_ERROR([LIB3270 not present.]))
  235 +if test "$app_cv_delayed_lib3270" == "yes"; then
  236 + PKG_CHECK_MODULES( [LIB3270], [lib3270-delayed], AC_DEFINE(LIB3270_DELAYED), AC_MSG_ERROR([LIB3270 delayed module is not present.]))
237 237 else
238   - PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(HAVE_LIB3270), AC_MSG_ERROR([LIB3270 not present.]))
  238 + PKG_CHECK_MODULES( [LIB3270], [lib3270], AC_DEFINE(LIB3270_DYNAMIC), AC_MSG_ERROR([LIB3270 dynamic module is not present.]))
239 239 fi
240 240  
241 241 AC_SUBST(LIB3270_LIBS)
... ...