diff --git a/harbour/ChangeLog b/harbour/ChangeLog index eb07b2dd95..4b07e7d2f4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,23 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-12-27 15:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbstack.h + * harbour/include/hbapi.h + * harbour/include/hbapiitm.h + * harbour/source/vm/hashes.c + * small modifications in order of some structure members for better + alignment + + * harbour/source/vm/hvm.c + * pacified BCC warnings + + * harbour/contrib/rddsql/Makefile + * harbour/contrib/rddsql/sddpg/Makefile + + harbour/contrib/rddsql/sddfb/Makefile + * updated GNU make files for new SQL RDDs - many thanks to + Mindaugas + 2008-12-26 00:35 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + contrib/rddsql/sddfb + contrib/rddsql/sddfb/fbirddd.c diff --git a/harbour/contrib/rddsql/Makefile b/harbour/contrib/rddsql/Makefile index 384bbcf8c1..618309d081 100644 --- a/harbour/contrib/rddsql/Makefile +++ b/harbour/contrib/rddsql/Makefile @@ -6,24 +6,14 @@ ROOT = ../../ LIBNAME=rddsql -ifeq ($(HB_INC_MYSQL),) -ifeq ($(HB_XBUILD),) -HB_INC_MYSQL = /usr/include/mysql -endif -endif - -HB_INC_MYSQL_OK += $(foreach d, $(HB_INC_MYSQL), $(if $(wildcard $(d)/mysql.h),$(d),)) - -ifneq ($(strip $(HB_INC_MYSQL_OK)),) - -C_USR += $(foreach d, $(HB_INC_MYSQL_OK), -I$(d)) - C_SOURCES=\ - mysqldd.c \ sqlbase.c \ sqlmix.c \ +DIRS=\ + sddmy \ + sddpg \ + sddfb \ + include $(TOP)$(ROOT)config/lib.cf -else -include $(TOP)$(ROOT)config/none.cf -endif +include $(TOP)$(ROOT)config/dir.cf diff --git a/harbour/contrib/rddsql/sddfb/Makefile b/harbour/contrib/rddsql/sddfb/Makefile new file mode 100644 index 0000000000..9e0ab9f5c1 --- /dev/null +++ b/harbour/contrib/rddsql/sddfb/Makefile @@ -0,0 +1,27 @@ +# +# $Id$ +# + +ROOT = ../../../ + +LIBNAME=sddfb + +ifeq ($(HB_INC_FBSQL),) +ifeq ($(HB_XBUILD),) +HB_INC_FIREBIRD = /usr/include /opt/firebird/include +endif +endif + +HB_INC_FIREBIRD_OK += $(foreach d, $(HB_INC_FIREBIRD), $(if $(wildcard $(d)/ibase.h),$(d),)) + +ifneq ($(strip $(HB_INC_FIREBIRD_OK)),) + +C_USR += $(foreach d, $(HB_INC_FIREBIRD_OK), -I$(d)) + +C_SOURCES=\ + fbsqldd.c \ + +include $(TOP)$(ROOT)config/lib.cf +else +include $(TOP)$(ROOT)config/none.cf +endif diff --git a/harbour/contrib/rddsql/sddpg/Makefile b/harbour/contrib/rddsql/sddpg/Makefile index 9db45ce472..17d5381b00 100644 --- a/harbour/contrib/rddsql/sddpg/Makefile +++ b/harbour/contrib/rddsql/sddpg/Makefile @@ -8,7 +8,7 @@ LIBNAME=sddpg ifeq ($(HB_INC_PGSQL),) ifeq ($(HB_XBUILD),) -HB_INC_MYSQL = /usr/include/postgresql +HB_INC_PGSQL = /usr/include/postgresql endif endif diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index e96937fbaa..20c33ce758 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -271,6 +271,13 @@ struct hb_struBlock USHORT method; }; +struct hb_struPointer +{ + void * value; + BOOL collect; + BOOL single; +}; + struct hb_struDate { long value; @@ -278,15 +285,21 @@ struct hb_struDate struct hb_struDouble { + double value; USHORT length; USHORT decimal; - double value; }; struct hb_struInteger { + int value; + USHORT length; +}; + +struct hb_struLong +{ + HB_LONG value; USHORT length; - int value; }; struct hb_struLogical @@ -294,19 +307,6 @@ struct hb_struLogical BOOL value; }; -struct hb_struLong -{ - USHORT length; - HB_LONG value; -}; - -struct hb_struPointer -{ - void * value; - BOOL collect; - BOOL single; -}; - struct hb_struMemvar { struct _HB_ITEM * value; @@ -435,14 +435,7 @@ typedef struct _HB_NESTED_CLONED struct _HB_NESTED_CLONED * pNext; } HB_NESTED_CLONED, * PHB_NESTED_CLONED; -typedef struct _HB_GRIP -{ - HB_ITEM value; - HB_COUNTER counter; -} HB_GRIP, * PHB_GRIP, * HB_GRIP_PTR; - - -#endif +#endif /* _HB_API_INTERNAL_ */ /* RDD method return codes */ diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index a528944138..027dbc9a6c 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -192,9 +192,9 @@ extern HB_EXPORT PHB_ITEM hb_itemDeserialize( const char ** pBufferPtr, ULONG # define hb_itemRawCpy( dst, src ) do { *(dst) = *(src); } while( 0 ) -#if 0 +#if 1 # define hb_itemRawMove( dst, src ) do { \ - memcpy( (dst), (src), sizeof( HB_ITEM ) ); \ + hb_itemRawCpy( dst, src ); \ (src)->type = HB_IT_NIL; \ } while( 0 ) #else /* _HB_API_INTERNAL_ */ diff --git a/harbour/include/hbstack.h b/harbour/include/hbstack.h index 1d1ab2c0c5..d6bafea71a 100644 --- a/harbour/include/hbstack.h +++ b/harbour/include/hbstack.h @@ -152,12 +152,12 @@ HB_DYN_HANDLES, * PHB_DYN_HANDLES; /* stack managed by the virtual machine */ typedef struct { - PHB_ITEM * pItems; /* pointer to the stack items */ PHB_ITEM * pPos; /* pointer to the latest used item */ PHB_ITEM * pEnd; /* pointer to the end of stack items */ - LONG wItems; /* total items that may be holded on the stack */ - HB_ITEM Return; /* latest returned value */ + PHB_ITEM * pItems; /* pointer to the stack items */ PHB_ITEM * pBase; /* stack frame position for the current function call */ + HB_ITEM Return; /* latest returned value */ + LONG wItems; /* total items that may be holded on the stack */ LONG lStatics; /* statics base for the current function call */ LONG lWithObject; /* stack offset to base current WITH OBJECT item */ LONG lRecoverBase; /* current SEQUENCE envelope offset or 0 if no SEQUENCE is active */ diff --git a/harbour/source/vm/hashes.c b/harbour/source/vm/hashes.c index 21c95f3a66..a4e6af4714 100644 --- a/harbour/source/vm/hashes.c +++ b/harbour/source/vm/hashes.c @@ -75,10 +75,10 @@ typedef struct _HB_HASHPAIR typedef struct _HB_BASEHASH { PHB_HASHPAIR pPairs; /* pointer to the array of key/value pairs */ + PHB_ITEM pDefault; /* default autoadd value */ ULONG ulSize; /* size of allocated pair array */ ULONG ulLen; /* number of used items in pair array */ int iFlags; /* hash item flags */ - PHB_ITEM pDefault; /* default autoadd value */ } HB_BASEHASH, * PHB_BASEHASH, * HB_BASEHASH_PTR; diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 0ad0b6986b..f3a5cb8f5c 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -3140,8 +3140,8 @@ static void hb_vmMult( HB_ITEM_PTR pResult, HB_ITEM_PTR pItem1, HB_ITEM_PTR pIte { HB_TRACE(HB_TR_DEBUG, ("hb_vmMult(%p,%p,%p)", pResult, pItem1, pItem2)); -#if HB_LONG_MAX > HB_INT_MAX * HB_INT_MAX && \ - HB_LONG_MIN < HB_INT_MIN * HB_INT_MIN && 1 +#if HB_LONG_MAX / HB_INT_MAX >= HB_INT_MAX && \ + HB_LONG_MIN / HB_INT_MIN >= HB_INT_MIN && 1 if( HB_IS_INTEGER( pItem1 ) && HB_IS_INTEGER( pItem2 ) ) { HB_LONG lResult = ( HB_LONG ) pItem1->item.asInteger.value *