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.
This commit is contained in:
Viktor Szakats
2010-02-16 10:14:24 +00:00
parent 85aea7dab1
commit cd83e94235
24 changed files with 137 additions and 31 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -94,7 +94,7 @@
#include <winnetwk.h>
#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 );

View File

@@ -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();

View File

@@ -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

View File

@@ -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 )

View File

@@ -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

View File

@@ -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 ) );

View File

@@ -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

View File

@@ -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_ */

View File

@@ -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

View File

@@ -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__ )

View File

@@ -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;

View File

@@ -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

View File

@@ -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__ ) && \

View File

@@ -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)

View File

@@ -60,6 +60,9 @@
#if defined( HB_OS_WIN )
#include <windows.h>
#if defined( HB_OS_WIN_CE )
#include "hbwince.h"
#endif
#endif
/* NOTE: Warning, this function _may_ return NULL as a result if

View File

@@ -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 )

View File

@@ -96,6 +96,9 @@
#elif defined( HB_OS_WIN )
#include <windows.h>
#if defined( HB_OS_WIN_CE )
#include "hbwince.h"
#endif
#endif

View File

@@ -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

View File

@@ -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,

View File

@@ -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 ) );

View File

@@ -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}"