diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6cc97f2b0e..574355daae 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,96 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-08-28 12:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * make_vc.bat + * Updated usage text. + + * include/hbwince.h + ! Fix for Pelles C 5.0 in WinCE/ARM mode. + + * include/hbsetup.h + + Detecting Pelles C 5.0 in ARM mode as HB_WINCE. + + * ChangeLog + - Removed some advices not valid anymore from previous entry. + + * contrib/mtpl_b32.bat + * contrib/mtpl_vc.bat + * Synced with /make_*.bat so that the name of the .mak + file is now hard-wired instead of being HB_CC_NAME dependent. + This way contribs may be built for WinCE in the future + (this still needs adding WinCE support to mtpl_vc.mak). + + * contrib/mtpl_gcc.sh + + Darwin autodetection was missing. + + * contrib/hbfimage/fi_winfu.c + ! Added CBM_INIT definition for Pellec C in WinCE mode. + + * source/rtl/gtclip.c + + Added GMEM_MOVEABLE definiction for Pelles C in WinCE mode. + + + config/w32/poccce.cf + + Added Pellec C WinCE make file. + + + config/w32/msvcce.cf + + Added WinCE GNU make file for MSVC. Untested, probably not working, + this is just a small step to make the GNU-make equal in feature + with the non-GNU make one. + + * config/w32/bcc32.cf + * Minor sync of C options with non-GNU make file. + + * config/w32/msvc.cf + * Attempt to sync C options with non-GNU make file. + + * contrib/hbfbird/firebird.c + * Minor formatting. + + ; NOTE1: For better consistency I'd like to rename GNU make compiler names + 'mingw32' to 'mingw' (they've dropped '32' long ago), and + 'cemgw' to 'mingwce'. + ; NOTE2: Pelles C WinCE build still generates following errors: + POLINK: error: Unresolved external symbol 'GetModuleFileNameA'. + POLINK: error: Unresolved external symbol 'RegOpenKeyExA'. + ../../math.c(605): error #3120: [asm] Symbol 'inf' is undefined. + contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file . + ../../ctmath2.c(324): error #3120: [asm] Symbol 'inf' is undefined. + ../../win32.c(70): error #2048: Undeclared identifier 'CS_OWNDC'. + ../../win32.c(75): error #2048: Undeclared identifier 'IDI_APPLICATION'. + ../../win32.c(75): error #2140: Type error in argument 2 to 'LoadIconA'; found 'int', expected 'const char *'. + ../../win32.c(181): error #2048: Undeclared identifier 'MFS_DISABLED'. + ../../win32.c(194): warning #2027: Missing prototype for 'InsertMenuItem'. + ../../win32.c(219): warning #2027: Missing prototype for 'SetMenu'. + ../../odbc.c(94): fatal error #1035: Can't find include file . + contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'. [ ... ] + ../../w32_ole.c(403): error #2152: Unknown field 'pllVal' of 'union (no name)'. + ../../w32_ole.c(403): error #2168: Operands of = have incompatible types 'int' and 'long long int *'. + ../../w32_ole.c(408): error #2152: Unknown field 'llVal' of 'union (no name)'. + ../../w32_ole.c(786): error #2152: Unknown field 'pllVal' of 'union (no name)'. + ../../w32_ole.c(786): error #2144: Type error: pointer expected. + ../../w32_ole.c(792): error #2152: Unknown field 'llVal' of 'union (no name)'. + ../../hbsyslog.c(31): error #2140: Type error in argument 2 to 'RegisterEventSourceW'; found 'const char *', expected 'const wchar_t *'. + ../../hbsyslog.c(97): error #2140: Type error in argument 8 to 'ReportEventW'; found 'const char * *', expected 'const wchar_t * *'. + ../../firebird.c(448): error #2149: Undefined size for 'times' with type '(incomplete) struct tm'. + ../../firebird.c(479): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'. + ../../firebird.c(480): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'. + ../../firebird.c(481): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'. + ../../firebird.c(482): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'. + ../../firebird.c(483): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'. + ../../firebird.c(484): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'. + ../../firebird.c(493): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'. + ../../firebird.c(493): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'. + ../../firebird.c(493): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'. + ../../firebird.c(502): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'. + ../../firebird.c(503): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'. + ../../firebird.c(504): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'. + ../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'. + ../../fi_winfu.c(98): error #2048: Undeclared identifier 'CBM_INIT'. + ../../fi_winfu.c(99): error #2168: Operands of = have incompatible types 'HBITMAP' and 'int'. + ../../fi_winfu.c(150): warning #2027: Missing prototype for 'GetDIBits'. + [ lots of them with hbmysql ] + 2008-08-28 01:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * make_b32.bat * make_vc.bat @@ -44,14 +134,6 @@ ! Undone previous modification. Quotes are needed to support dirs containing spaces (this is actually the case for the default install dir of ACE SDK). - For very old MSVC compilers not understanding quotes - in -I (and possibly other) switches, pls specify the - external package #include directories directly through: - set C_USR=-IC:\mypath\pkg\include - and so on. MSVC98 is a very old product and there is - probably no way to make all features of our build systems - 100% compatible with it, but with this manual workaround, - it can properly work (until a recommended VC upgrade :). 2008-08-27 17:05 UTC+0100 JF Lefebvre (Mafact) (jfl at mafact dot com) * contrib/rddads/make_vc.bat diff --git a/harbour/config/w32/bcc32.cf b/harbour/config/w32/bcc32.cf index 99b93bfb8e..67e8052c9a 100644 --- a/harbour/config/w32/bcc32.cf +++ b/harbour/config/w32/bcc32.cf @@ -15,7 +15,7 @@ CC = bcc32.exe CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -O2 -d -w -w-sig- +CFLAGS = -O2 -q -d -w -w-sig- LD = bcc32.exe LDFLAGS = -O2 diff --git a/harbour/config/w32/msvc.cf b/harbour/config/w32/msvc.cf index b644270c07..69f13fd500 100644 --- a/harbour/config/w32/msvc.cf +++ b/harbour/config/w32/msvc.cf @@ -13,7 +13,14 @@ CC = cl.exe CC_IN = -c CC_OUT = -Fo CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -nologo -W0 -Zi # -W4 for max warnings +# -W4 for max warnings +CFLAGS = -nologo -W3 -Zi + +ifeq ($(HB_VISUALC_VER_PRE80),) +CFLAGS += -Ot2b1 -EHs-c- -FD -Gs -D_CRT_SECURE_NO_DEPRECATE +else +CFLAGS += -Ogt2yb1p -GX- -G6 -YX -FD -Gs +endif LD = cl.exe LD_OUT = -Fe diff --git a/harbour/config/w32/msvcce.cf b/harbour/config/w32/msvcce.cf new file mode 100644 index 0000000000..ba54dff1ac --- /dev/null +++ b/harbour/config/w32/msvcce.cf @@ -0,0 +1,55 @@ +# +# $Id$ +# + +# Work in progress. Please test. + +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf + +OBJ_EXT = .obj +EXE_EXT = .exe +LIB_PREF = +LIB_EXT = .lib + +CC = cl.exe +CC_IN = -c +CC_OUT = -Fo +CPPFLAGS = -I. -I$(HB_INC_COMPILE) +# -W4 for max warnings +CFLAGS = -nologo -W3 -D"_WIN32_WCE=0x420" -D"UNDER_CE=0x420" -D"WIN32_PLATFORM_PSPC" -D"WINCE" -D"_WINCE" -D"_WINDOWS" -D"ARM" -D"_ARM_" -D"ARMV4" -D"POCKETPC2003_UI_MODEL" -D"_M_ARM" -D"UNICODE" -D"_UNICODE" -D_UWIN + +ifeq ($(HB_VISUALC_VER_PRE80),) +CFLAGS += -Od -Os -Gy -GS- -EHsc- -fp:fast -Gm -Zi -GR- -FD -D_CRT_SECURE_NO_DEPRECATE +else +CFLAGS += -Oxsb1 -EHsc -YX -GF +endif + +LD = cl.exe +LD_OUT = -Fe + +# Add all libraries specified in CONTRIBS and LIBS. +ifeq ($(HB_LIB_COMPILE),) +LINKPATHS += -link -LIBPATH:$(LIB_DIR) +else +LINKPATHS += -link -LIBPATH:$(HB_LIB_COMPILE) +endif +LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(LIB_EXT)) +LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) + +# If LIBS specifies the rdd library, add all DB drivers. +ifeq ($(findstring rdd,$(LIBS)),rdd) +LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) +endif + +# Add the specified GT driver library +ifeq ($(findstring rtl,$(LIBS)),rtl) +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) +endif + +LDFLAGS = $(LINKPATHS) + +AR = lib.exe +ARFLAGS = $(A_USR) +AR_RULE = $(AR) $(ARFLAGS) /out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ + +include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/w32/poccce.cf b/harbour/config/w32/poccce.cf index 0c3f42a8a3..2b73014062 100644 --- a/harbour/config/w32/poccce.cf +++ b/harbour/config/w32/poccce.cf @@ -23,7 +23,7 @@ CPPFLAGS += -Ze -Go CPPFLAGS += -Ot -Ox # For Pocket PC and ARM processors (including XScale) -CPPFLAGS += -Tarm-coff +CPPFLAGS += -Tarm-coff -DSTRSAFE_NO_DEPRECATE ifneq ($(HB_INC_COMPILE),) CPPFLAGS += -I$(HB_INC_COMPILE) diff --git a/harbour/contrib/hbfbird/firebird.c b/harbour/contrib/hbfbird/firebird.c index 828a67229f..fffb0a6a68 100644 --- a/harbour/contrib/hbfbird/firebird.c +++ b/harbour/contrib/hbfbird/firebird.c @@ -445,7 +445,7 @@ HB_FUNC( FBGETDATA ) char data[ MAX_BUFFER ]; char date_s[ 25 ]; - struct tm times; + struct tm times; XSQLVAR * var; XSQLDA * sqlda = ( XSQLDA * ) hb_itemGetPtr( hb_itemArrayGet( aParam, 2 ) ); ISC_STATUS status[ MAX_FIELDS ]; diff --git a/harbour/contrib/hbfimage/fi_winfu.c b/harbour/contrib/hbfimage/fi_winfu.c index ae2d51ae10..63cea8bb15 100644 --- a/harbour/contrib/hbfimage/fi_winfu.c +++ b/harbour/contrib/hbfimage/fi_winfu.c @@ -73,6 +73,11 @@ #include "FreeImage.h" +/* Needed for POCC 5.0 / WinCE */ +#ifndef CBM_INIT + #define CBM_INIT 2 +#endif + /* -------------------------------------------------------------------------- */ /* Convert from FreeImage to HBITMAP ---------------------------------------- */ /* -------------------------------------------------------------------------- */ diff --git a/harbour/contrib/mtpl_b32.bat b/harbour/contrib/mtpl_b32.bat index bf32fa32b0..9766ba483a 100644 --- a/harbour/contrib/mtpl_b32.bat +++ b/harbour/contrib/mtpl_b32.bat @@ -21,7 +21,7 @@ set _HB_MAKEFILE=%HB_MAKEFILE% if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=b32 if "%_HB_MAKE_PROGRAM%" == "" set _HB_MAKE_PROGRAM=make.exe -if "%_HB_MAKEFILE%" == "" set _HB_MAKEFILE=..\mtpl_%_HB_CC_NAME%.mak +if "%_HB_MAKEFILE%" == "" set _HB_MAKEFILE=..\mtpl_b32.mak set _HB_MAKELOG=make_%_HB_CC_NAME%.log set HB_EXIT_LEVEL= diff --git a/harbour/contrib/mtpl_gcc.sh b/harbour/contrib/mtpl_gcc.sh index 89dba40d14..79848ed99b 100755 --- a/harbour/contrib/mtpl_gcc.sh +++ b/harbour/contrib/mtpl_gcc.sh @@ -34,6 +34,7 @@ if [ -z "$HB_ARCHITECTURE" ]; then *cygwin*) hb_arch="cyg" ;; *dos) hb_arch="dos" ;; *bsd) hb_arch="bsd" ;; + *darwin) hb_arch="darwin" ;; esac fi export HB_ARCHITECTURE="$hb_arch" _HB_ARCH_SAVED=1 diff --git a/harbour/contrib/mtpl_vc.bat b/harbour/contrib/mtpl_vc.bat index fcaf62c268..1ad463856c 100644 --- a/harbour/contrib/mtpl_vc.bat +++ b/harbour/contrib/mtpl_vc.bat @@ -21,7 +21,7 @@ set _HB_MAKEFILE=%HB_MAKEFILE% if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=vc if "%_HB_MAKE_PROGRAM%" == "" set _HB_MAKE_PROGRAM=nmake.exe -if "%_HB_MAKEFILE%" == "" set _HB_MAKEFILE=..\mtpl_%_HB_CC_NAME%.mak +if "%_HB_MAKEFILE%" == "" set _HB_MAKEFILE=..\mtpl_vc.mak set _HB_MAKELOG=make_%_HB_CC_NAME%.log set HB_EXIT_LEVEL= diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 3a8e95bd50..5e795c23a0 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -302,7 +302,7 @@ /* Sub-option inside HB_OS_WIN_32 */ #ifndef HB_WINCE - #if defined(_WINCE) || defined(__CEGCC__) || defined(__MINGW32CE__) + #if defined(_WINCE) || defined(__CEGCC__) || defined(__MINGW32CE__) || (__POCC_TARGET__ == 2) #define HB_WINCE #endif #endif diff --git a/harbour/include/hbwince.h b/harbour/include/hbwince.h index ad62d97504..3e69836454 100644 --- a/harbour/include/hbwince.h +++ b/harbour/include/hbwince.h @@ -152,16 +152,31 @@ extern char *strerror( int errnum ); BOOL WINAPI Arc( HDC hdc, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4); #if defined( __POCC__ ) || defined( __XCC__ ) + #ifndef GlobalAlloc #define GlobalAlloc(flags, cb) LocalAlloc(flags, cb) + #endif + #ifndef GlobalLock #define GlobalLock(lp) LocalLock(lp) + #endif + #ifndef GlobalUnlock #define GlobalUnlock(lp) LocalUnlock(lp) + #endif + #ifndef GlobalSize #define GlobalSize(lp) LocalSize(lp) + #endif + #ifndef GlobalFree #define GlobalFree(h) LocalFree(h) + #endif + #ifndef GlobalReAlloc #define GlobalReAlloc(h, cb, flags) LocalReAlloc(h, cb, flags) + #endif + #ifndef GlobalHandle #define GlobalHandle(lp) LocalHandle(lp) + #endif + #ifndef GlobalFlags #define GlobalFlags(lp) LocalFlags(lp) #endif - + #endif #endif /* HB_OS_WIN_32_USED && _MSC_VER */ #endif /* HB_WINCE */ diff --git a/harbour/make_vc.bat b/harbour/make_vc.bat index b121a6b7c6..b371860bc5 100644 --- a/harbour/make_vc.bat +++ b/harbour/make_vc.bat @@ -19,7 +19,7 @@ rem set HB_REBUILD_PARSER=yes rem set HB_MAKE_PROGRAM= rem set HB_SHOW_ERRORS= rem set HB_MAKE_FLAGS= -rem set HB_CC_NAME= +rem set HB_CC_NAME=vc or vcce rem set HB_BUILD_WINCE=yes rem --------------------------------------------------------------- diff --git a/harbour/source/rtl/gtclip.c b/harbour/source/rtl/gtclip.c index 459fc4cce4..6a15768e4a 100644 --- a/harbour/source/rtl/gtclip.c +++ b/harbour/source/rtl/gtclip.c @@ -56,8 +56,12 @@ #define HB_OS_WIN_32_USED #include "hbgtcore.h" -#if defined(__CYGWIN__) +#if defined( __CYGWIN__ ) #include +#elif defined( __POCC__ ) && defined( HB_WINCE ) + #ifndef GMEM_MOVEABLE + #define GMEM_MOVEABLE 0x0002 + #endif #endif /* TODO: add protection for MT mode */