diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 319cf008f3..a92886446d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,54 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-16 11:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * include/hbthread.h + * src/vm/fm.c + ! Tweaks to allow msvcarm 2003 build. + + * src/vm/maindllp/dllpcode.c + * src/vm/maindllh.c + ! Deleted (AFAIK unnecessary) HB_EXPORT to make msvcarm 2003 happy. + + * src/common/hbgete.c + * src/rtl/net.c + ! Fixed missing #include hbwince.h. + + * external/sqlite3/Makefile + - Disabled for msvcarm 2003. + + * contrib/gtalleg/Makefile + - Disabled for msvcarm. + + * contrib/hbodbc/Makefile + * contrib/rddsql/sddodbc/Makefile + ! Do not force sql.h header for msvcarm 2003. + + * contrib/rddbmcdx/hbbmcdx.h + ! Fixed HB_EXTERN placement to make msvcarm 2003 happy. + + * contrib/hbct/ctnet.c + * contrib/xhb/hbsyslog.c + * contrib/xhb/hbserv.c + * contrib/hbtpathy/tpwin.c + * contrib/hbnf/getenvrn.c + * contrib/hbwin/wapi_winuser.c + * contrib/hbwin/olecore.c + * contrib/hbwin/win_dlg.c + ! Fixed to make them compile on msvcarm 2003. + + * config/wce/msvcarm.mk + * utils/hbmk2/hbmk2.prg + ! Fixed warning option for msvcarm 2003. + + * utils/hbmk2/hbmk2.prg + ! Fixed type causing RTE with msvcarm targets. + + ; NOTE: hbcurl doesn't build with msvcarm 2003, so either + don't enable it, or experiment with HB_USER_CFLAGS=-U_WIN32_WCE + hack. The problem lies somewhere in libcurl headers, + not Harbour code. + 2010-02-16 09:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_dllc.c * contrib/hbwin/tests/testdll.prg diff --git a/harbour/config/wce/msvcarm.mk b/harbour/config/wce/msvcarm.mk index c4f83af6f8..18044e1c33 100644 --- a/harbour/config/wce/msvcarm.mk +++ b/harbour/config/wce/msvcarm.mk @@ -49,7 +49,13 @@ ifeq ($(HB_BUILD_MODE),) endif ifneq ($(HB_BUILD_WARN),no) - CFLAGS += -W4 -wd4127 + ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) + # Lowered warning level to avoid large amount of warnings in system headers. + # Maybe this is related to the msvc2003 kit I was using. [vszakats] + CFLAGS += -W2 + else + CFLAGS += -W4 -wd4127 + endif endif ifneq ($(HB_BUILD_OPTIM),no) diff --git a/harbour/contrib/gtalleg/Makefile b/harbour/contrib/gtalleg/Makefile index 2329855feb..f6f03c3db9 100644 --- a/harbour/contrib/gtalleg/Makefile +++ b/harbour/contrib/gtalleg/Makefile @@ -16,7 +16,7 @@ _DET_DSP_NAME := allegro _DET_VAR_INC_ := HB_INC_ALLEGRO _DET_VAR_HAS_ := HB_HAS_ALLEGRO _DET_FLT_PLAT := -_DET_FLT_COMP := !pocc !pocc64 !poccarm !xcc !dmc !watcom !mingwarm +_DET_FLT_COMP := !pocc !pocc64 !poccarm !xcc !dmc !watcom !mingwarm !msvcarm _DET_INC_DEFP := /usr/include /opt/local/include _DET_INC_HEAD := /allegro.h include $(TOP)$(ROOT)config/detfun.mk diff --git a/harbour/contrib/hbct/ctnet.c b/harbour/contrib/hbct/ctnet.c index cfb31aa565..7ac35885f9 100644 --- a/harbour/contrib/hbct/ctnet.c +++ b/harbour/contrib/hbct/ctnet.c @@ -94,7 +94,7 @@ #include #endif -#if defined( HB_OS_WIN ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) 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 ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) 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 ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) 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 ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) char cDrive[ 3 ]; cDrive[ 0 ] = hb_parcx( 1 )[ 0 ]; @@ -161,7 +161,7 @@ HB_FUNC( NETDISK ) HB_FUNC( NETREDIR ) { -#if defined( HB_OS_WIN ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) void * hLocalDev; void * hSharedRes; void * hPassword; @@ -247,7 +247,7 @@ HB_FUNC( NETREDIR ) HB_FUNC( NETRMTNAME ) { -#if defined( HB_OS_WIN ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) void * hLocalDev; TCHAR lpRemoteDevice[ 128 ]; @@ -268,7 +268,7 @@ HB_FUNC( NETRMTNAME ) HB_FUNC( NETWORK ) { -#if defined( HB_OS_WIN ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) 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 ) +#if defined( HB_OS_WIN ) && !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) TCHAR lpProviderName[ 128 ]; DWORD dwLen = HB_SIZEOFARRAY( lpProviderName ); diff --git a/harbour/contrib/hbnf/getenvrn.c b/harbour/contrib/hbnf/getenvrn.c index 39a64678a4..45a1947bef 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__ ) ) +#elif defined( HB_OS_WIN ) && ! ( defined( HB_OS_WIN_CE ) && ( defined( __POCC__ ) || ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) ) { char *buffer = NULL; LPTCH lpEnviron = GetEnvironmentStrings(); diff --git a/harbour/contrib/hbodbc/Makefile b/harbour/contrib/hbodbc/Makefile index 7a497f7d7e..262e576e23 100644 --- a/harbour/contrib/hbodbc/Makefile +++ b/harbour/contrib/hbodbc/Makefile @@ -21,6 +21,11 @@ PRG_HEADERS := \ ifneq ($(filter $(HB_PLATFORM),win wce),) HB_INC_ODBC := force + ifeq ($(HB_COMPILER),msvcarm) + ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) + HB_INC_ODBC := + endif + endif endif _DET_DSP_NAME := odbc diff --git a/harbour/contrib/hbtpathy/tpwin.c b/harbour/contrib/hbtpathy/tpwin.c index b7d8406b0d..d23017a9f7 100644 --- a/harbour/contrib/hbtpathy/tpwin.c +++ b/harbour/contrib/hbtpathy/tpwin.c @@ -64,6 +64,7 @@ HB_FUNC( __TP_INITPORTSPEED ) { +#if !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) DCB dcb; char values[ 20 ]; LPTSTR lpValues; @@ -96,6 +97,9 @@ HB_FUNC( __TP_INITPORTSPEED ) hb_retnl( -1 ); HB_TCHAR_FREE( lpValues ); +#else + hb_retnl( -1 ); +#endif } HB_FUNC( __TP_READPORT ) diff --git a/harbour/contrib/hbwin/olecore.c b/harbour/contrib/hbwin/olecore.c index 3978b0984b..29e4ce2816 100644 --- a/harbour/contrib/hbwin/olecore.c +++ b/harbour/contrib/hbwin/olecore.c @@ -56,14 +56,16 @@ /* enable workaround for wrong OLE variant structure definition */ #if ( defined( __POCC__ ) && defined( HB_OS_WIN_CE ) ) || \ - defined( __DMC__ ) + defined( __DMC__ ) || \ + ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) # define HB_OLE_NO_LL #endif #if ( defined( __POCC__ ) && defined( HB_OS_WIN_CE ) ) || \ ( defined( __WATCOMC__ ) && ( __WATCOMC__ < 1280 ) ) || \ defined( __MINGW32__ ) || \ - defined( __DMC__ ) + defined( __DMC__ ) || \ + ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) # define HB_OLE_NO_LLREF #endif diff --git a/harbour/contrib/hbwin/wapi_winuser.c b/harbour/contrib/hbwin/wapi_winuser.c index 49e2f1c3b4..f6bd3329cb 100644 --- a/harbour/contrib/hbwin/wapi_winuser.c +++ b/harbour/contrib/hbwin/wapi_winuser.c @@ -54,6 +54,11 @@ #include "hbwapi.h" #include "hbapierr.h" +#ifndef WS_OVERLAPPEDWINDOW + /* For: ( defined( HB_OS_WIN_CE ) && defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) */ +# define WS_OVERLAPPEDWINDOW ( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX ) +#endif + HB_FUNC( WAPI_GETSYSTEMMETRICS ) { int iResult = GetSystemMetrics( hb_parni( 1 ) ); diff --git a/harbour/contrib/hbwin/win_dlg.c b/harbour/contrib/hbwin/win_dlg.c index 49cbb9233a..f0eae731ff 100644 --- a/harbour/contrib/hbwin/win_dlg.c +++ b/harbour/contrib/hbwin/win_dlg.c @@ -97,6 +97,8 @@ HB_FUNC( WIN_PRINTDLGDC ) #endif +#if !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) + static LPTSTR s_dialogPairs( int iParam, DWORD * pdwIndex ) { PHB_ITEM pItem = hb_param( iParam, HB_IT_ARRAY | HB_IT_STRING ), pArrItem; @@ -296,3 +298,5 @@ HB_FUNC( WIN_GETSAVEFILENAME ) { s_GetFileName( HB_TRUE ); } + +#endif diff --git a/harbour/contrib/rddbmcdx/hbbmcdx.h b/harbour/contrib/rddbmcdx/hbbmcdx.h index 0bf252d97f..8e3190c9d2 100644 --- a/harbour/contrib/rddbmcdx/hbbmcdx.h +++ b/harbour/contrib/rddbmcdx/hbbmcdx.h @@ -507,6 +507,8 @@ typedef BM_FILTER * LPBM_FILTER; #undef SUPERTABLE #define SUPERTABLE ( &cdxSuper ) +HB_EXTERN_END + #define hb_cdxBof NULL #define hb_cdxEof NULL #define hb_cdxFound NULL @@ -608,6 +610,4 @@ static HB_ERRCODE hb_cdxSetFilter( CDXAREAP pArea, LPDBFILTERINFO pFilterInfo ); static HB_ERRCODE hb_cdxRddInfo( LPRDDNODE pRDD, HB_USHORT uiIndex, HB_ULONG ulConnect, PHB_ITEM pItem ); #define hb_cdxWhoCares NULL -HB_EXTERN_END - #endif /* HB_RDDCDX_H_ */ diff --git a/harbour/contrib/rddsql/sddodbc/Makefile b/harbour/contrib/rddsql/sddodbc/Makefile index d4d335a1b4..658b163f37 100644 --- a/harbour/contrib/rddsql/sddodbc/Makefile +++ b/harbour/contrib/rddsql/sddodbc/Makefile @@ -13,6 +13,11 @@ C_SOURCES := \ ifneq ($(filter $(HB_PLATFORM),win wce),) HB_INC_ODBC := force + ifeq ($(HB_COMPILER),msvcarm) + ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) + HB_INC_ODBC := + endif + endif endif _DET_DSP_NAME := odbc diff --git a/harbour/contrib/xhb/hbserv.c b/harbour/contrib/xhb/hbserv.c index c302a9e7cd..c3dccd4f7c 100644 --- a/harbour/contrib/xhb/hbserv.c +++ b/harbour/contrib/xhb/hbserv.c @@ -71,7 +71,7 @@ /* These targets can't compile this module */ #if !defined( HB_OS_DOS ) && \ !defined( HB_OS_DARWIN_5 ) && \ - ! ( defined( HB_OS_WIN_CE ) && defined( __POCC__ ) ) && \ + ! ( defined( HB_OS_WIN_CE ) && ( defined( __POCC__ ) || ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) ) && \ !defined( HB_OS_WIN_64 ) && \ ( !defined( HB_OS_OS2 ) || defined( HB_OS_OS2_GCC ) ) && \ !defined( __HAIKU__ ) diff --git a/harbour/contrib/xhb/hbsyslog.c b/harbour/contrib/xhb/hbsyslog.c index 7702ec122d..ad8f062fbc 100644 --- a/harbour/contrib/xhb/hbsyslog.c +++ b/harbour/contrib/xhb/hbsyslog.c @@ -25,7 +25,8 @@ static HANDLE s_RegHandle; HB_FUNC( HB_SYSLOGOPEN ) { #if defined( HB_OS_WIN ) - #if ( WINVER >= 0x0400 ) + #if ( WINVER >= 0x0400 ) && \ + ! ( defined( HB_OS_WIN_CE ) && defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) /* Ok, we compiled under NT, but we must not use this function when RUNNING on a win98. */ if( hb_iswinnt() ) @@ -52,7 +53,8 @@ HB_FUNC( HB_SYSLOGOPEN ) HB_FUNC( HB_SYSLOGCLOSE ) { #if defined( HB_OS_WIN ) - #if ( WINVER >= 0x0400 ) + #if ( WINVER >= 0x0400 ) && \ + ! ( defined( HB_OS_WIN_CE ) && defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) if( hb_iswinnt() ) { DeregisterEventSource( s_RegHandle ); @@ -72,7 +74,8 @@ HB_FUNC( HB_SYSLOGCLOSE ) HB_FUNC( HB_SYSLOGMESSAGE ) { #if defined( HB_OS_WIN ) - #if ( WINVER >= 0x0400 ) + #if ( WINVER >= 0x0400 ) && \ + ! ( defined( HB_OS_WIN_CE ) && defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) if( hb_iswinnt() ) { WORD logval; diff --git a/harbour/external/sqlite3/Makefile b/harbour/external/sqlite3/Makefile index 25b1ab7499..8a710a1796 100644 --- a/harbour/external/sqlite3/Makefile +++ b/harbour/external/sqlite3/Makefile @@ -19,6 +19,12 @@ HB_SUPPORTED := yes ifeq ($(HB_COMPILER),poccarm) HB_SUPPORTED := no endif +# NOTE: old msvcarm can't cope with some PP directives. [vszakats] +ifeq ($(HB_COMPILER),msvcarm) + ifneq ($(filter $(HB_COMPILER_VER),600 700 710),) + HB_SUPPORTED := no + endif +endif # NOTE: dos based watcom runs out of memory. [vszakats] ifeq ($(HB_HOST_PLAT)-$(HB_COMPILER),dos-watcom) HB_SUPPORTED := no diff --git a/harbour/include/hbthread.h b/harbour/include/hbthread.h index fe517f8dd6..b65b490027 100644 --- a/harbour/include/hbthread.h +++ b/harbour/include/hbthread.h @@ -180,7 +180,8 @@ HB_EXTERN_BEGIN # if defined( HB_OS_WIN_CE ) && \ ( ( defined( __MINGW32CE__ ) && !defined( __MSVCRT__ ) ) || \ - defined( __POCC__ ) ) + defined( __POCC__ ) ) || \ + ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) # define HB_THREAD_RAWWINAPI # endif @@ -433,7 +434,7 @@ extern HB_BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, HB_ULONG ulMilliSec, P /* enable native compiler TLS support by default for this compilers * which are known that it will work correctly */ -# if defined( _MSC_VER ) && !defined( __POCC__ ) && !defined( __XCC__ ) +# if ( defined( _MSC_VER ) && ( _MSC_VER > 1310 ) ) && !defined( __POCC__ ) && !defined( __XCC__ ) # define HB_USE_TLS # elif defined( __GNUC__ ) && __GNUC__ >= 3 && \ defined( __GLIBC__ ) && defined( __GLIBC_MINOR__ ) && \ diff --git a/harbour/include/hbwince.h b/harbour/include/hbwince.h index cfb35e4572..8fdcf4173d 100644 --- a/harbour/include/hbwince.h +++ b/harbour/include/hbwince.h @@ -67,6 +67,7 @@ HB_EXTERN_BEGIN #if defined( _MSC_VER ) + #ifndef MAX_COMPUTERNAME_LENGTH #define MAX_COMPUTERNAME_LENGTH 31 #define SEM_FAILCRITICALERRORS 0x0001 @@ -117,6 +118,10 @@ HB_EXTERN_BEGIN BOOL WINAPI Arc( HDC hdc, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); #endif /* _MSC_VER */ +#if defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) + int WINAPI MulDiv( int nNumber, int nNumerator, int nDenominator ); +#endif + #if defined( __POCC__ ) || defined( __XCC__ ) #ifndef GlobalAlloc #define GlobalAlloc(flags, cb) LocalAlloc(flags, cb) diff --git a/harbour/src/common/hbgete.c b/harbour/src/common/hbgete.c index 5383613e9f..a154cf7aad 100644 --- a/harbour/src/common/hbgete.c +++ b/harbour/src/common/hbgete.c @@ -60,6 +60,9 @@ #if defined( HB_OS_WIN ) #include + #if defined( HB_OS_WIN_CE ) + #include "hbwince.h" + #endif #endif /* NOTE: Warning, this function _may_ return NULL as a result if diff --git a/harbour/src/common/hbwince.c b/harbour/src/common/hbwince.c index e2e39096d1..93da513723 100644 --- a/harbour/src/common/hbwince.c +++ b/harbour/src/common/hbwince.c @@ -259,7 +259,7 @@ BOOL WINAPI SetKeyboardState( PBYTE p ) return FALSE; } -#if defined( __MINGW32CE__ ) +#if defined( __MINGW32CE__ ) || ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) int WINAPI MulDiv( int nNumber, int nNumerator, int nDenominator ) { if( nDenominator ) diff --git a/harbour/src/rtl/net.c b/harbour/src/rtl/net.c index a6e1c4ff60..884804bb82 100644 --- a/harbour/src/rtl/net.c +++ b/harbour/src/rtl/net.c @@ -96,6 +96,9 @@ #elif defined( HB_OS_WIN ) #include + #if defined( HB_OS_WIN_CE ) + #include "hbwince.h" + #endif #endif diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index 2e131b2f4e..75dbdd0eb0 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -142,7 +142,9 @@ #if defined( HB_FM_DL_ALLOC ) # if !defined( HB_FM_DLMT_ALLOC ) && !defined( HB_FM_DLMT_ALLOC_OFF ) && \ defined( HB_MT_VM ) -# define HB_FM_DLMT_ALLOC +# if !( defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) +# define HB_FM_DLMT_ALLOC +# endif # endif /* # define NO_MALLINFO 1 */ /* # define INSECURE */ @@ -164,7 +166,7 @@ # pragma warn -ngu # pragma warn -prc # pragma warn -rch -# elif defined( HB_OS_WIN_CE ) && defined( __POCC__ ) +# elif defined( HB_OS_WIN_CE ) && ( defined( __POCC__ ) || ( defined( _MSC_VER ) && ( _MSC_VER <= 1310 ) ) ) # define ABORT TerminateProcess( GetCurrentProcess(), 0 ) # elif defined( __POCC__ ) && !defined( InterlockedCompareExchangePointer ) # define InterlockedCompareExchangePointer diff --git a/harbour/src/vm/maindllh.c b/harbour/src/vm/maindllh.c index 375539c9a1..b6a7c01f10 100644 --- a/harbour/src/vm/maindllh.c +++ b/harbour/src/vm/maindllh.c @@ -65,9 +65,9 @@ #if defined( HB_OS_WIN ) #if defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) || defined( __POCC__ ) ) -HB_EXPORT BOOL WINAPI HB_DLL_ENTRY_POINT( HANDLE hInstance, DWORD fdwReason, PVOID pvReserved ) +BOOL WINAPI HB_DLL_ENTRY_POINT( HANDLE hInstance, DWORD fdwReason, PVOID pvReserved ) #else -HB_EXPORT BOOL WINAPI HB_DLL_ENTRY_POINT( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) +BOOL WINAPI HB_DLL_ENTRY_POINT( HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved ) #endif { HB_TRACE( HB_TR_DEBUG, ("DllEntryPoint(%p, %lu, %p)", hInstance, fdwReason, diff --git a/harbour/src/vm/maindllp/dllpcode.c b/harbour/src/vm/maindllp/dllpcode.c index 30b4ea2e0d..740267570e 100644 --- a/harbour/src/vm/maindllp/dllpcode.c +++ b/harbour/src/vm/maindllp/dllpcode.c @@ -118,7 +118,7 @@ typedef PHB_SYMB ( * HB_VM_PROCESS_SYMBOLS ) ( PHB_SYMB pModuleSymbols, HB_USHORT uiModuleSymbols, const char * szModuleName, HB_ULONG ulID, HB_USHORT uiPcodeVer ); -static PHB_SYMB s_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, +static PHB_SYMB s_vmProcessSymbols( PHB_SYMB pSymbols, HB_USHORT uiSymbols, const char * szModuleName, HB_ULONG ulID, HB_USHORT uiPcodeVer ); static HB_VM_PROCESS_SYMBOLS s_pProcessSymbols = s_vmProcessSymbols; @@ -168,9 +168,9 @@ PHB_FUNC hb_dllGetProcAddress( const char * szProcName ) #if defined( HB_OS_WIN_CE ) && ( defined( _MSC_VER ) || defined( __POCC__ ) ) -HB_EXPORT BOOL WINAPI HB_DLL_ENTRY_POINT( HANDLE hInstance, DWORD dwReason, PVOID pvReserved ) +BOOL WINAPI HB_DLL_ENTRY_POINT( HANDLE hInstance, DWORD dwReason, PVOID pvReserved ) #else -HB_EXPORT BOOL WINAPI HB_DLL_ENTRY_POINT( HINSTANCE hInstance, DWORD dwReason, PVOID pvReserved ) +BOOL WINAPI HB_DLL_ENTRY_POINT( HINSTANCE hInstance, DWORD dwReason, PVOID pvReserved ) #endif { HB_TRACE( HB_TR_DEBUG, ("DllEntryPoint(%p, %lu, %p)", hInstance, dwReason, pvReserved ) ); diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 5a993c6485..881188f7b2 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -3092,7 +3092,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) IF Empty( nCCompVer ) /* Compatibility with Harbour GNU Make system */ - IF hbmk[ _HBMK_cCOMP ] == "msvcarm" .AND. FindInPath( "clarm" ) + IF hbmk[ _HBMK_cCOMP ] == "msvcarm" .AND. ! Empty( FindInPath( "clarm" ) ) nCCompVer := 710 /* Visual Studio .NET 2003 */ ELSE nCCompVer := 800 /* Visual Studio 2005 */ @@ -3173,7 +3173,11 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) ENDIF ELSE IF hbmk[ _HBMK_nWARN ] == _WARN_YES - AAdd( hbmk[ _HBMK_aOPTC ], "-W4 -wd4127" ) + IF hbmk[ _HBMK_cCOMP ] == "msvcarm" .AND. nCCompVer < 800 + AAdd( hbmk[ _HBMK_aOPTC ], "-W2" ) + ELSE + AAdd( hbmk[ _HBMK_aOPTC ], "-W4 -wd4127" ) + ENDIF ENDIF ENDIF cOpt_CompC += " {FC} {LC}"