diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b4798425cd..3deb2f62da 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,35 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-15 09:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbct/ctnet.c + * contrib/hbtpathy/tpwin.c + * contrib/hbnf/getenvrn.c + ! Fixed to disable some functionality on all WinCE platforms. + These were WinCE API functions wrongly declared in + mingwarm/poccarm headers. (thus causing link-time errors + for final apps trying to use these functions) + + * contrib/hbwin/win_dlg.c + ! Enabled more functionality for WinCE. mingwarm builds + will probably crash due to buggy commdlg.h header. + + * src/vm/fm.c + ! Fixed to redefine ABORT for all wce/msvcarm targets. + + * utils/hbmk2/hbmk2.prg + ! Minor typo in recently added help item. + + * contrib/gtwvg/gtwvg.h + * contrib/gtwvg/wvggui.h + * contrib/hbwin/win_prn1.c + * contrib/hbwin/win_prn2.c + * contrib/hbwin/win_prn3.c + * contrib/hbwin/win_dlg.c + * contrib/hbodbc/odbc.c + * contrib/rddsql/sddodbc/sddodbc.c + ! Fixed to compile with -DWIN32_LEAN_AND_MEAN. + 2010-03-14 22:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * bin/postinst.bat ! Fixed hbmk2 -lang option. diff --git a/harbour/contrib/gtwvg/gtwvg.h b/harbour/contrib/gtwvg/gtwvg.h index 171ca67b30..43bec1e27f 100644 --- a/harbour/contrib/gtwvg/gtwvg.h +++ b/harbour/contrib/gtwvg/gtwvg.h @@ -82,6 +82,7 @@ #include #endif #include +#include #include #include diff --git a/harbour/contrib/gtwvg/wvggui.h b/harbour/contrib/gtwvg/wvggui.h index 30e00dd043..20f57d0740 100644 --- a/harbour/contrib/gtwvg/wvggui.h +++ b/harbour/contrib/gtwvg/wvggui.h @@ -78,6 +78,7 @@ #include #endif #include +#include #include #include diff --git a/harbour/contrib/hbct/ctnet.c b/harbour/contrib/hbct/ctnet.c index 336a08180f..bef65bf1a1 100644 --- a/harbour/contrib/hbct/ctnet.c +++ b/harbour/contrib/hbct/ctnet.c @@ -94,7 +94,7 @@ #include #endif -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) static HB_BOOL hb_IsNetShared( const char * szLocalDevice ) { TCHAR lpRemoteDevice[ 128 ]; @@ -113,7 +113,7 @@ static HB_BOOL hb_IsNetShared( const char * szLocalDevice ) HB_FUNC( NETCANCEL ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) DWORD dwResult; LPTSTR lpDevice = HB_TCHAR_CONVTO( hb_parcx( 1 ) ); @@ -132,7 +132,7 @@ HB_FUNC( NETCANCEL ) HB_FUNC( NETPRINTER ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) const char * cPrn = hb_setGetCPtr( HB_SET_PRINTFILE ); /* query default local printer port. */ if( !cPrn || !*cPrn || hb_stricmp( cPrn, "PRN" ) == 0 ) @@ -146,7 +146,7 @@ HB_FUNC( NETPRINTER ) HB_FUNC( NETDISK ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) char cDrive[ 3 ]; cDrive[ 0 ] = hb_parcx( 1 )[ 0 ]; @@ -161,7 +161,7 @@ HB_FUNC( NETDISK ) HB_FUNC( NETREDIR ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) void * hLocalDev; void * hSharedRes; void * hPassword; @@ -247,7 +247,7 @@ HB_FUNC( NETREDIR ) HB_FUNC( NETRMTNAME ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) void * hLocalDev; TCHAR lpRemoteDevice[ 128 ]; @@ -268,7 +268,7 @@ HB_FUNC( NETRMTNAME ) HB_FUNC( NETWORK ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) DWORD dwResult; TCHAR lpProviderName[ 128 ]; DWORD dwLen = HB_SIZEOFARRAY( lpProviderName ); @@ -292,7 +292,7 @@ HB_FUNC( NETWORK ) HB_FUNC( NNETWORK ) { -#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) TCHAR lpProviderName[ 128 ]; DWORD dwLen = HB_SIZEOFARRAY( lpProviderName ); diff --git a/harbour/contrib/hbnf/getenvrn.c b/harbour/contrib/hbnf/getenvrn.c index 8ea7679dab..b1d753fed4 100644 --- a/harbour/contrib/hbnf/getenvrn.c +++ b/harbour/contrib/hbnf/getenvrn.c @@ -170,7 +170,7 @@ HB_FUNC( FT_GETE ) /* return number of strings found */ hb_retni( x ); } -#elif defined( HB_OS_WIN ) && ! ( defined( HB_OS_WIN_CE ) && ( defined( __POCC__ ) || ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) ) +#elif defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) { char *buffer = NULL; LPTCH lpEnviron = GetEnvironmentStrings(); diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index dff2040cb0..77cf4d4367 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -82,6 +82,10 @@ /* Required by headers on Windows */ #if defined( HB_OS_WIN ) # include + /* Required for WIN32_LEAN_AND_MEAN mode */ +# if ! defined( WIN32 ) +# define WIN32 +# endif #endif #include diff --git a/harbour/contrib/hbtpathy/tpwin.c b/harbour/contrib/hbtpathy/tpwin.c index ae6ba4e8e9..1a9f2ae1f5 100644 --- a/harbour/contrib/hbtpathy/tpwin.c +++ b/harbour/contrib/hbtpathy/tpwin.c @@ -64,7 +64,7 @@ HB_FUNC( __TP_INITPORTSPEED ) { -#if !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) +#if ! defined( HB_OS_WIN_CE ) DCB dcb; char values[ 20 ]; LPTSTR lpValues; diff --git a/harbour/contrib/hbwin/win_dlg.c b/harbour/contrib/hbwin/win_dlg.c index af6af8472c..e424dc6766 100644 --- a/harbour/contrib/hbwin/win_dlg.c +++ b/harbour/contrib/hbwin/win_dlg.c @@ -58,7 +58,7 @@ #include "hbwin.h" #include "hbwapi.h" -#if ! defined( HB_OS_WIN_CE ) +#include /* WIN_PRINTDLGDC( [@], [], [], [] ) * -> @@ -69,15 +69,18 @@ HB_FUNC( WIN_PRINTDLGDC ) memset( &pd, 0, sizeof( pd ) ); +#if ! defined( HB_OS_WIN_CE ) pd.lStructSize = sizeof( pd ); pd.hwndOwner = GetActiveWindow(); pd.Flags = PD_RETURNDC | PD_USEDEVMODECOPIESANDCOLLATE; pd.nFromPage = ( WORD ) hb_parnidef( 2, 1 ); pd.nToPage = ( WORD ) hb_parnidef( 3, 1 ); pd.nCopies = ( WORD ) hb_parnidef( 4, 1 ); +#endif if( PrintDlg( &pd ) ) { +#if ! defined( HB_OS_WIN_CE ) if( pd.hDevNames ) { LPDEVNAMES lpdn = ( LPDEVNAMES ) GlobalLock( pd.hDevNames ); @@ -90,15 +93,20 @@ HB_FUNC( WIN_PRINTDLGDC ) GlobalFree( pd.hDevMode ); hbwapi_ret_HDC( pd.hDC ); +#else + hb_storc( NULL, 1 ); + +#if defined( __MINGW32__ ) /* NOTE: mingwarm has the struct names/members wrong. */ + hbwapi_ret_HDC( pd.hDC ); +#else + hbwapi_ret_HDC( pd.hdc ); +#endif +#endif } else hb_retptr( NULL ); } -#endif - -#if !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1500 ) ) ) - static LPTSTR s_dialogPairs( int iParam, DWORD * pdwIndex ) { PHB_ITEM pItem = hb_param( iParam, HB_IT_ARRAY | HB_IT_STRING ), pArrItem; @@ -298,5 +306,3 @@ HB_FUNC( WIN_GETSAVEFILENAME ) { s_GetFileName( HB_TRUE ); } - -#endif diff --git a/harbour/contrib/hbwin/win_prn1.c b/harbour/contrib/hbwin/win_prn1.c index 03b13180b4..805f5a1748 100644 --- a/harbour/contrib/hbwin/win_prn1.c +++ b/harbour/contrib/hbwin/win_prn1.c @@ -80,6 +80,8 @@ #define FONTENUMPROC FONTENUMPROCW #endif #endif +#else + #include #endif HB_FUNC( WIN_CREATEDC ) diff --git a/harbour/contrib/hbwin/win_prn2.c b/harbour/contrib/hbwin/win_prn2.c index 0381f448c8..025b10cd2b 100644 --- a/harbour/contrib/hbwin/win_prn2.c +++ b/harbour/contrib/hbwin/win_prn2.c @@ -56,6 +56,10 @@ #include "hbapifs.h" #include "hbapiitm.h" +#if ! defined( HB_OS_WIN_CE ) + #include +#endif + #define _ENUMPRN_FLAGS_ ( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS ) static HB_BOOL hb_IsLegacyDevice( const char * pszPrinterName ) diff --git a/harbour/contrib/hbwin/win_prn3.c b/harbour/contrib/hbwin/win_prn3.c index ba6e1f81ed..193286e03d 100644 --- a/harbour/contrib/hbwin/win_prn3.c +++ b/harbour/contrib/hbwin/win_prn3.c @@ -54,6 +54,8 @@ #if ! defined( HB_OS_WIN_CE ) +#include + /* NOTE: Based on hb_strncat() */ static TCHAR * hb_tstrncat( TCHAR * pDest, const TCHAR * pSource, HB_SIZE nLen ) { diff --git a/harbour/contrib/rddsql/sddodbc/sddodbc.c b/harbour/contrib/rddsql/sddodbc/sddodbc.c index 42058c015f..d183de0a67 100644 --- a/harbour/contrib/rddsql/sddodbc/sddodbc.c +++ b/harbour/contrib/rddsql/sddodbc/sddodbc.c @@ -65,6 +65,10 @@ /* Required by headers on Windows */ #if defined( HB_OS_WIN ) # include + /* Required for WIN32_LEAN_AND_MEAN mode */ +# if ! defined( WIN32 ) +# define WIN32 +# endif #endif #include diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index 492549fc7b..0b30c74003 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -180,10 +180,8 @@ # if !defined( USE_DL_PREFIX ) && !defined( HB_FM_DLMT_ALLOC ) # define USE_DL_PREFIX # endif -# if defined( HB_OS_WIN_CE ) && ( _MSC_VER <= 1500 ) -# define ABORT TerminateProcess( GetCurrentProcess(), 0 ) -# endif # if defined( HB_OS_WIN_CE ) +# define ABORT TerminateProcess( GetCurrentProcess(), 0 ) # define LACKS_FCNTL_H # endif # elif defined( __MINGW32__ ) diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index d5091f3c0e..848e637ca4 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -8488,7 +8488,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) { "-comp[iler]=", I_( "select C compiler.\nSpecial value:\n - bld: use original build settings (default on *nix)" ) },; { "-build=" , I_( "use a specific build name" ) },; { "-lang=" , I_( "override default language. Similar to HB_LANG envvar." ) },; - { "-width=" , I_( "set output width to character." ) },; + { "-width=" , I_( "set output width to characters." ) },; { "--version" , I_( "display version header only" ) },; { "-pause" , I_( "force waiting for a key on exit in case of failure (with alternate GTs only)" ) },; { "-info" , I_( "turn on informational messages" ) },;