2025-01-30 02:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* contrib/sddsqlt3/core.c
  * include/hbdefs.h
  * src/compiler/gencc.c
  * src/rtl/abs.c
  * src/vm/hvm.c
    * added workarounds for OpenWatcom 2.0 bug in 64bit expressions used
      in #[el]if statements
This commit is contained in:
Przemysław Czerpak
2025-01-30 02:48:48 +01:00
parent 1d0c512822
commit e66aab7eff
6 changed files with 24 additions and 13 deletions

View File

@@ -7,6 +7,15 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2025-01-30 02:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/sddsqlt3/core.c
* include/hbdefs.h
* src/compiler/gencc.c
* src/rtl/abs.c
* src/vm/hvm.c
* added workarounds for OpenWatcom 2.0 bug in 64bit expressions used
in #[el]if statements
2025-01-29 13:50 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/bio.c
! respect OPENSSL_NO_SOCK macro

View File

@@ -590,9 +590,11 @@ static HB_ERRCODE sqlite3GoTo( SQLBASEAREAP pArea, HB_ULONG ulRecNo )
break;
case HB_FT_INTEGER:
#if HB_VMLONG_MAX > INT32_MAX && ! defined( HB_LONG_LONG_OFF )
#if HB_VMLONG_MAX != INT32_MAX && ! defined( HB_LONG_LONG_OFF )
pItem = hb_itemPutNInt( NULL, sqlite3_column_int64( st, ui ) );
break;
#else
/* fallthrough */
#endif
case HB_FT_LONG:
pItem = hb_itemPutNDDec( NULL, sqlite3_column_double( st, ui ), pField->uiDec );

View File

@@ -599,7 +599,7 @@ typedef HB_U32 HB_FATTR;
#endif
/* type for file offsets */
#if defined( HB_LONG_LONG_OFF ) || ULONG_MAX == ULONGLONG_MAX
#if defined( HB_LONG_LONG_OFF ) || LONG_MAX == LONGLONG_MAX
typedef HB_LONG HB_FOFFSET;
/* we can add hack with double as work around what should
effectively give 52bit file size limit */

View File

@@ -1298,7 +1298,7 @@ static HB_GENC_FUNC( hb_p_pushlonglong )
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmPushLongLong( %.1f );\n", HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] ) );
return 9;
#elif LONG_MAX < LONGLONG_MAX
#elif LONG_MAX != LONGLONG_MAX
HB_LONGLONG llVal;
char szBuf[ 24 ];
@@ -1315,7 +1315,7 @@ static HB_GENC_FUNC( hb_p_pushlonglong )
HB_GENC_LABEL();
fprintf( cargo->yyc, "#if LONG_MAX >= LONGLONG_MAX\n" );
fprintf( cargo->yyc, "#if LONG_MAX == LONGLONG_MAX\n" );
llVal = HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] );
iSkip = hb_gencc_checkNumAhead( llVal, pFunc, nPCodePos + 9, cargo );

View File

@@ -67,10 +67,10 @@ HB_FUNC( ABS )
hb_retnilen( iNumber, iWidth );
#if -HB_VMINT_MAX > HB_VMINT_MIN
else if( iNumber < -INT_MAX )
#if HB_VMLONG_MAX > HB_VMINT_MAX
hb_retnint( -( HB_MAXINT ) iNumber );
#else
#if HB_VMLONG_MAX == HB_VMINT_MAX
hb_retndlen( -( double ) iNumber, 0, iDec );
#else
hb_retnint( -( HB_MAXINT ) iNumber );
#endif
#endif
else

View File

@@ -3165,17 +3165,17 @@ static void hb_vmNegate( void )
#if -HB_VMINT_MAX > HB_VMINT_MIN
if( pItem->item.asInteger.value < -HB_VMINT_MAX )
{
#if HB_VMLONG_MAX > HB_VMINT_MAX
HB_MAXINT nValue = ( HB_MAXINT ) pItem->item.asInteger.value;
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = -nValue;
pItem->item.asLong.length = HB_LONG_EXPLENGTH( -nValue );
#else
#if HB_VMLONG_MAX == HB_VMINT_MAX
double dValue = ( double ) pItem->item.asInteger.value;
pItem->type = HB_IT_DOUBLE;
pItem->item.asDouble.value = -dValue;
pItem->item.asDouble.length = HB_DBL_LENGTH( -dValue );
pItem->item.asDouble.decimal = 0;
#else
HB_MAXINT nValue = ( HB_MAXINT ) pItem->item.asInteger.value;
pItem->type = HB_IT_LONG;
pItem->item.asLong.value = -nValue;
pItem->item.asLong.length = HB_LONG_EXPLENGTH( -nValue );
#endif
}
else