2010-05-24 11:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbapi.h
  * harbour/include/hbvmint.h
  * harbour/include/hbvmopt.h
  * harbour/include/hbstack.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbtypes.h
  * harbour/src/vm/estack.c
  * harbour/src/vm/hvmall.c
    * slightly modified the names of HB_{API|STACK}_MACROS.
      These are internal macros in current Harbour code but they are
      still defined in some old user build scripts used to compiled
      user or core code what could cause unpredictable results for
      final binaries. AFAIR default xMate configuration enables them.
This commit is contained in:
Przemyslaw Czerpak
2010-05-24 09:39:17 +00:00
parent 965c71d8e1
commit dbcd987a99
9 changed files with 44 additions and 29 deletions

View File

@@ -17,6 +17,21 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-24 11:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/include/hbvmint.h
* harbour/include/hbvmopt.h
* harbour/include/hbstack.h
* harbour/include/hbvmpub.h
* harbour/include/hbtypes.h
* harbour/src/vm/estack.c
* harbour/src/vm/hvmall.c
* slightly modified the names of HB_{API|STACK}_MACROS.
These are internal macros in current Harbour code but they are
still defined in some old user build scripts used to compiled
user or core code what could cause unpredictable results for
final binaries. AFAIR default xMate configuration enables them.
2010-05-24 11:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
! Fixed non-initialized variable (broken in after one of

View File

@@ -699,7 +699,7 @@ extern HB_EXPORT void hb_retnlllen( HB_LONGLONG lNumber, int iWidth ); /* retu
#define HB_IS_VALID_INDEX( idx, max ) ( (idx) > 0 && ( HB_ULONG ) (idx) <= (max) )
#ifdef HB_API_MACROS
#ifdef _HB_API_MACROS_
#define hb_pcount() ( ( int ) ( hb_stackBaseItem() )->item.asSymbol.paramcnt )
@@ -731,7 +731,7 @@ extern HB_EXPORT void hb_retnlllen( HB_LONGLONG lNumber, int iWidth ); /* retu
#define hb_retptr( pointer ) hb_itemPutPtr( hb_stackReturnItem(), pointer )
#define hb_retptrGC( pointer ) hb_itemPutPtrGC( hb_stackReturnItem(), pointer )
#endif /* HB_API_MACROS */
#endif /* _HB_API_MACROS_ */
extern HB_EXPORT int hb_stor( int iParam ); /* stores a NIL on a variable by reference */
@@ -1047,9 +1047,9 @@ extern void hb_memvarRestoreFromArray( PHB_ITEM pArray );
extern void hb_memvarValueIncRef( PHB_ITEM pValue ); /* increase the reference count of a global value */
extern void hb_memvarValueDecRef( PHB_ITEM pValue ); /* decrease the reference count of a global value */
extern PHB_ITEM hb_memvarGetItem( PHB_SYMB pMemvarSymb );
#if defined( HB_API_MACROS )
#if defined( _HB_API_MACROS_ )
# define hb_memvarValueIncRef( p ) hb_xRefInc( p )
#endif /* HB_API_MACROS */
#endif /* _HB_API_MACROS_ */
#endif /* _HB_API_INTERNAL_ */
/* console I/O subsystem */

View File

@@ -188,10 +188,10 @@ typedef struct
#endif
} HB_STACK, * PHB_STACK;
#if defined( HB_STACK_MACROS )
#if defined( _HB_STACK_MACROS_ )
# if defined( HB_MT_VM )
# if defined( HB_USE_TLS )
# if !defined( HB_STACK_LOCAL_MACROS )
# if !defined( _HB_STACK_LOCAL_MACROS_ )
# if defined( __BORLANDC__ )
extern PHB_STACK HB_TLS_ATTR hb_stack_ptr;
# else
@@ -199,13 +199,13 @@ typedef struct
# endif
# endif
# else
# if !defined( HB_STACK_LOCAL_MACROS )
# if !defined( _HB_STACK_LOCAL_MACROS_ )
extern HB_TLS_KEY hb_stack_key;
# endif
# if defined( __BORLANDC__ ) && defined( HB_STACK_PRELOAD ) && \
!defined( HB_OS_WIN_64 ) && !defined( HB_OS_WIN_CE ) && \
defined( HB_ASM_TLS )
# if defined( HB_STACK_LOCAL_MACROS )
# if defined( _HB_STACK_LOCAL_MACROS_ )
static HB_TLS_KEY hb_stack_key;
# endif
static __inline void * hb_stack_ptr_from_tls( void )
@@ -222,7 +222,7 @@ typedef struct
# define hb_stack_ptr_get() hb_stack_ptr_from_tls()
# elif defined( __MINGW32__ ) && defined( HB_ASM_TLS ) && \
!defined( HB_OS_WIN_64 ) && !defined( HB_OS_WIN_CE )
# if defined( HB_STACK_LOCAL_MACROS )
# if defined( _HB_STACK_LOCAL_MACROS_ )
static HB_TLS_KEY hb_stack_key;
# endif
static __inline__ __attribute__ ((pure, malloc)) void * hb_stack_ptr_from_tls( void )
@@ -257,7 +257,7 @@ typedef struct
# define hb_stack_ref() ( hb_stack_ptr )
# endif
# else
# if !defined( HB_STACK_LOCAL_MACROS )
# if !defined( _HB_STACK_LOCAL_MACROS_ )
extern HB_STACK hb_stack;
# endif
# define hb_stack_ref() ( &hb_stack )
@@ -267,7 +267,7 @@ typedef struct
# if defined( HB_STACK_PRELOAD )
# define HB_STACK_TLS_PRELOAD
# undef HB_STACK_PRELOAD
# elif defined( HB_STACK_MACROS )
# elif defined( _HB_STACK_MACROS_ )
# define HB_STACK_TLS_PRELOAD
# endif
#endif
@@ -376,7 +376,7 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int );
#endif
#if defined( HB_STACK_MACROS )
#if defined( _HB_STACK_MACROS_ )
#define hb_stackItemFromTop( n ) ( * ( hb_stack.pPos + ( int ) ( n ) ) )
#define hb_stackItemFromBase( n ) ( * ( hb_stack.pBase + ( int ) ( n ) + 1 ) )

View File

@@ -53,7 +53,7 @@
#ifndef HB_TYPES_H_
#define HB_TYPES_H_
#undef HB_API_MACROS
#undef _HB_API_MACROS_
#include "hbapi.h"

View File

@@ -59,8 +59,8 @@
* which interacts with alignment are used. [druzus]
*/
#undef HB_API_MACROS
#undef HB_STACK_MACROS
#undef _HB_API_MACROS_
#undef _HB_STACK_MACROS_
#if !defined( _HB_API_INTERNAL_ )
# define _HB_API_INTERNAL_

View File

@@ -58,12 +58,12 @@
* it was compiled and only if exactly the same C compiler switches
* which interacts with alignment are used. [druzus]
*/
#if !defined( HB_NO_DEFAULT_API_MACROS ) && !defined( HB_API_MACROS )
# define HB_API_MACROS
#if !defined( HB_NO_DEFAULT_API_MACROS ) && !defined( _HB_API_MACROS_ )
# define _HB_API_MACROS_
#endif
#if !defined( HB_NO_DEFAULT_STACK_MACROS ) && !defined( HB_STACK_MACROS )
# define HB_STACK_MACROS
#if !defined( HB_NO_DEFAULT_STACK_MACROS ) && !defined( _HB_STACK_MACROS_ )
# define _HB_STACK_MACROS_
#endif
#if !defined( _HB_API_INTERNAL_ )

View File

@@ -157,8 +157,8 @@ struct _HB_SYMB;
#else /* !_HB_API_INTERNAL_ */
# undef HB_API_MACROS
# undef HB_STACK_MACROS
# undef _HB_API_MACROS_
# undef _HB_STACK_MACROS_
/* This is ugly trick but works without speed overhead */
# define HB_ITEM_TYPERAW( p ) ( * ( HB_TYPE * ) ( p ) )

View File

@@ -87,13 +87,13 @@
# ifdef HB_USE_TLS
/* compiler has native support for TLS */
# if !defined( HB_STACK_MACROS )
# if !defined( _HB_STACK_MACROS_ )
# if defined( __BORLANDC__ )
static PHB_STACK HB_TLS_ATTR hb_stack_ptr;
# else
static HB_TLS_ATTR PHB_STACK hb_stack_ptr;
# endif
# elif !defined( HB_STACK_LOCAL_MACROS )
# elif !defined( _HB_STACK_LOCAL_MACROS_ )
# if defined( __BORLANDC__ )
PHB_STACK HB_TLS_ATTR hb_stack_ptr = NULL;
# else
@@ -110,10 +110,10 @@
# else
/* compiler has no native TLS support, we have to implement it ourselves */
# if !defined( HB_STACK_MACROS )
# if !defined( _HB_STACK_MACROS_ )
static HB_TLS_KEY hb_stack_key;
# define hb_stack_ptr ( ( PHB_STACK ) hb_tls_get( hb_stack_key ) )
# elif !defined( HB_STACK_LOCAL_MACROS )
# elif !defined( _HB_STACK_LOCAL_MACROS_ )
HB_TLS_KEY hb_stack_key;
# endif
static volatile HB_BOOL s_fInited = HB_FALSE;
@@ -138,9 +138,9 @@
#else
/* no MT mode */
# if !defined( HB_STACK_MACROS )
# if !defined( _HB_STACK_MACROS_ )
static HB_STACK hb_stack;
# elif !defined( HB_STACK_LOCAL_MACROS )
# elif !defined( _HB_STACK_LOCAL_MACROS_ )
HB_STACK hb_stack;
# endif

View File

@@ -58,7 +58,7 @@
#define HB_NO_FLATTEN
#define HB_STACK_LOCAL_MACROS
#define _HB_STACK_LOCAL_MACROS_
#define HB_STACK_PRELOAD
#define INCL_BASE
@@ -84,7 +84,7 @@
#include "hbstack.h"
#if defined( HB_STACK_MACROS ) && defined( HB_STACK_LOCAL_MACROS )
#if defined( _HB_STACK_MACROS_ ) && defined( _HB_STACK_LOCAL_MACROS_ )
# if defined( HB_MT_VM )
# if defined( HB_USE_TLS )
# if defined( __BORLANDC__ )