diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9701023522..96a75238b2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-08 15:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbsocket.c + * bin/hb-mkdyn.sh + * bin/hb-func.sh + * utils/hbmk2/hbmk2.prg + * config/win/global.mk + + Restored to work with ws2_32.dll. (instead of wsock32) + + * INSTALL + + Added information on Win9x/ME support. + 2010-03-08 12:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/diskspac.c * src/rtl/disksphb.c diff --git a/harbour/INSTALL b/harbour/INSTALL index 3106465627..b1e9166e5b 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -465,6 +465,7 @@ HARBOUR hpux - HP-UX sunos - Sun Solaris / OpenSolaris win - MS Windows (all flavors) + (see LINKS section for Win9x requirements) wce - MS Windows CE dos - MS-DOS (32-bit protected mode only) (MS-DOS compatible systems also work, like dosemu) @@ -616,8 +617,8 @@ HARBOUR - HB_BUILD_OPTIM=no Enable C compiler optimizations. Default: yes - HB_BUILD_UNICODE=yes Create Unicode build (on Windows/Windows CE). Default: yes - Instead of turning it off, we recommended to - use UNICOWS solution to support Win9x systems. + Instead of turning it off, we recommend to use + UNICOWS solution to support Win9x/ME systems. - HB_BUILD_MODE=[cpp|c] Change default build mode to C++ or C. Default: c, except for msvc* compilers, where it's cpp. - HB_BUILD_PARTS= @@ -1368,10 +1369,16 @@ HARBOUR HB_WITH_ZLIB - zlib [multiplatform, free, open-source] http://www.zlib.net/ + Windows Winsock2 [win, free, closed-source] + Information: http://support.microsoft.com/kb/182108/EN-US/ + Direct link: http://download.microsoft.com/download/0/e/0/0e05231b-6bd1-4def-a216-c656fbd22b4e/w95ws2setup.exe + (required for Win95 support to run applications built with Harbour) Windows UNICOWS .dll [win, free, closed-source] http://go.microsoft.com/fwlink/?LinkId=14851 + (required for Win9x/ME support to run applications built with Harbour in UNICODE mode) Windows UNICOWS runtime/import library [win, free, open-source] http://libunicows.sourceforge.net/ + (required for Win9x/ME support at application built-time) Tools: diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index a261515761..0d7d07d0fb 100755 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -209,7 +209,7 @@ mk_hbtools() fi if [ "${HB_COMPILER}" = "mingw" ] || \ [ "${HB_COMPILER}" = "mingw64" ]; then - HB_SYS_LIBS="${HB_SYS_LIBS} -luser32 -lwinspool -lgdi32 -lcomctl32 -ladvapi32 -lcomdlg32 -lole32 -loleaut32 -luuid -lwsock32" + HB_SYS_LIBS="${HB_SYS_LIBS} -luser32 -lwinspool -lgdi32 -lcomctl32 -ladvapi32 -lcomdlg32 -lole32 -loleaut32 -luuid -lws2_32" elif [ "${HB_COMPILER}" = "mingwarm" ]; then HB_SYS_LIBS="${HB_SYS_LIBS} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32 -loleaut32" elif [ "${HB_COMPILER}" = "djgpp" ]; then @@ -823,7 +823,7 @@ mk_hblibso() hb_libs="${hb_libs//hbzlib/}" fi if [ "${HB_COMPILER}" = "mingw" ] || [ "${HB_COMPILER}" = "mingw64" ]; then - linker_options="${linker_options} -luser32 -lwinspool -lgdi32 -lcomctl32 -ladvapi32 -lcomdlg32 -lole32 -loleaut32 -luuid -lwsock32" + linker_options="${linker_options} -luser32 -lwinspool -lgdi32 -lcomctl32 -ladvapi32 -lcomdlg32 -lole32 -loleaut32 -luuid -lws2_32" elif [ "${HB_COMPILER}" = "mingwarm" ]; then linker_options="${linker_options} -lwininet -lws2 -lcommdlg -lcommctrl -luuid -lole32 -loleaut32" elif [ "${HB_COMPILER}" = "djgpp" ]; then diff --git a/harbour/bin/hb-mkdyn.sh b/harbour/bin/hb-mkdyn.sh index 845d197d7d..bea15a8351 100755 --- a/harbour/bin/hb-mkdyn.sh +++ b/harbour/bin/hb-mkdyn.sh @@ -137,7 +137,7 @@ elif [ "${SLIB_EXT}" = ".dll" ]; then if [ "$HB_COMPILER" = "mingwarm" ]; then SYSLIBS="-lws2" else - SYSLIBS="-luser32 -lwsock32 -ladvapi32 -lgdi32" + SYSLIBS="-luser32 -lws2_32 -ladvapi32 -lgdi32" fi # -Wl,--output-def,testdll.def,--out-implib,libtestdll.a ${HB_CCPATH}${HB_CCPREFIX}gcc -shared -o "${FULLNAME}" $OBJLST ${linker_options} ${HB_USER_DFLAGS} ${SYSLIBS} ${HB_DLLIBS} && \ diff --git a/harbour/config/win/global.mk b/harbour/config/win/global.mk index dff4e81ec7..74e9636290 100644 --- a/harbour/config/win/global.mk +++ b/harbour/config/win/global.mk @@ -11,7 +11,8 @@ HB_GT_LIBS += gtwvt gtgui gtwin # kernel32: needed by some compilers (pocc/watcom) # user32: *Clipboard*(), GetKeyState(), GetKeyboardState(), SetKeyboardState(), gtwvt stuff -# wsock32: hbsocket +# ws2_32/wsock32: hbsocket +# ws2_32: WSAIoctl() # advapi32: GetUserName() # gdi32: gtwvt -SYSLIBS += kernel32 user32 wsock32 advapi32 gdi32 +SYSLIBS += kernel32 user32 ws2_32 advapi32 gdi32 diff --git a/harbour/src/rtl/hbsocket.c b/harbour/src/rtl/hbsocket.c index bcad31f720..ec81d1c0e9 100644 --- a/harbour/src/rtl/hbsocket.c +++ b/harbour/src/rtl/hbsocket.c @@ -3199,17 +3199,8 @@ PHB_ITEM hb_socketGetIFaces( int af, HB_BOOL fNoAliases ) void * pBuffer = hb_xgrab( dwBuffer ); LPINTERFACE_INFO pIfInfo = ( LPINTERFACE_INFO ) pBuffer; -#if defined( HB_OS_WIN_CE ) || defined( HB_NO_WIN95 ) if( WSAIoctl( sd, SIO_GET_INTERFACE_LIST, NULL, 0, pIfInfo, dwBuffer, &dwBuffer, 0, 0 ) != SOCKET_ERROR ) -#else - LPFN_WSAIOCTL pWSAIoctl = - ( LPFN_WSAIOCTL ) GetProcAddress( GetModuleHandle( TEXT( "ws2_32.dll" ) ), "WSAIoctl" ); - - if( pWSAIoctl && - pWSAIoctl( sd, SIO_GET_INTERFACE_LIST, NULL, 0, pIfInfo, dwBuffer, - &dwBuffer, 0, 0 ) != SOCKET_ERROR ) -#endif { int iCount = dwBuffer / sizeof( INTERFACE_INFO ); diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index ad9373a556..9a05b2d25d 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1110,7 +1110,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) cBinExt := ".exe" cOptPrefix := "-/" /* NOTE: Some targets (watcom, pocc/xcc) need kernel32 explicitly. */ - l_aLIBSYSCORE := { "kernel32", "user32", "gdi32", "advapi32", "wsock32" } + l_aLIBSYSCORE := { "kernel32", "user32", "gdi32", "advapi32", "ws2_32" } l_aLIBSYSMISC := { "winspool", "comctl32", "comdlg32", "shell32", "uuid", "ole32", "oleaut32", "mpr", "winmm", "mapi32", "imm32", "msimg32", "wininet" } CASE hbmk[ _HBMK_cPLAT ] == "wce" #if ! defined( __PLATFORM__UNIX )