diff --git a/ChangeLog.txt b/ChangeLog.txt index 416e9a8883..a19fb300e9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,32 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2024-02-13 05:49 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * debian/compat + * set 10 as compatibility level + + * contrib/3rd/sqlite3/sqlite3.c + * contrib/3rd/sqlite3/sqlite3.diff + * do not use noinline function attribute in GCC prior 3.1 + + * contrib/xhb/xhberror.c + * src/rtl/gtdos/gtdos.c + ! fixed format specifiers in HB_TRACE() messages + + * src/common/expropt1.c + * src/rtl/langapi.c + * pass explicitly "(null)" string instead of NULL string pointer + to HB_TRACE() messages, some C compilers can autoinline functions + and generate warning detecting such situation + + * src/pp/hbpp.c + * cast revision number to ( HB_ULONG ) to avoid warnings in some + compilers which do not understand %I64u format specifier + + * utils/hbmk2/hbmk2.prg + * preffer HB_WITH_* settings then platform native pkg-config, + giving pkg-config precedence breaks cross and custom builds + 2024-02-10 11:27 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbcurl/core.c ! fixed bad copy & past typo diff --git a/contrib/3rd/sqlite3/sqlite3.c b/contrib/3rd/sqlite3/sqlite3.c index e95408dfc1..1d84641e43 100644 --- a/contrib/3rd/sqlite3/sqlite3.c +++ b/contrib/3rd/sqlite3/sqlite3.c @@ -13915,7 +13915,7 @@ struct fts5_api { ** Macros to hint to the compiler that a function should or should not be ** inlined. */ -#if defined(__GNUC__) +#if defined(__GNUC__) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=1)) # define SQLITE_NOINLINE __attribute__((noinline)) # define SQLITE_INLINE __attribute__((always_inline)) inline #elif defined(_MSC_VER) && _MSC_VER>=1310 @@ -203712,7 +203712,7 @@ static int jsonParseAddNode(JsonParse*,u32,u32,const char*); ** A macro to hint to the compiler that a function should not be ** inlined. */ -#if defined(__GNUC__) +#if defined(__GNUC__) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=1)) # define JSON_NOINLINE __attribute__((noinline)) #elif defined(_MSC_VER) && _MSC_VER>=1310 # define JSON_NOINLINE __declspec(noinline) diff --git a/contrib/3rd/sqlite3/sqlite3.diff b/contrib/3rd/sqlite3/sqlite3.diff index e3fc1dd0aa..b8ae6b4e60 100644 --- a/contrib/3rd/sqlite3/sqlite3.diff +++ b/contrib/3rd/sqlite3/sqlite3.diff @@ -1,5 +1,14 @@ ---- sqlite3.orig/sqlite3.c 2023-11-24 14:33:56.000000000 +0100 -+++ sqlite3/sqlite3.c 2023-12-07 21:33:32.000000000 +0100 +--- sqlite3.orig/sqlite3.c 2024-02-12 21:32:10.804005193 +0100 ++++ sqlite3/sqlite3.c 2024-02-12 21:26:49.931101008 +0100 +@@ -13915,7 +13915,7 @@ + ** Macros to hint to the compiler that a function should or should not be + ** inlined. + */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) && __GNUC__>=3 + # define SQLITE_NOINLINE __attribute__((noinline)) + # define SQLITE_INLINE __attribute__((always_inline)) inline + #elif defined(_MSC_VER) && _MSC_VER>=1310 @@ -34853,6 +34853,17 @@ return h; } diff --git a/contrib/xhb/xhberror.c b/contrib/xhb/xhberror.c index 0883f20877..ab3dfa111a 100644 --- a/contrib/xhb/xhberror.c +++ b/contrib/xhb/xhberror.c @@ -110,7 +110,7 @@ HB_UINT hb_errGetProcLine( PHB_ITEM pError ) PHB_ITEM hb_errPutProcLine( PHB_ITEM pError, HB_UINT uiProcLine ) { - HB_TRACE( HB_TR_DEBUG, ( "hb_errPutProcLine(%p, %hu)", pError, uiProcLine ) ); + HB_TRACE( HB_TR_DEBUG, ( "hb_errPutProcLine(%p, %u)", pError, uiProcLine ) ); if( hb_arrayLen( pError ) < s_nErrProcName ) s_xhbErrorResize( pError ); diff --git a/debian/compat b/debian/compat index ec635144f6..f599e28b8a 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/src/common/expropt1.c b/src/common/expropt1.c index 434122a823..4b554ec739 100644 --- a/src/common/expropt1.c +++ b/src/common/expropt1.c @@ -454,7 +454,7 @@ PHB_EXPR hb_compExprNewCodeBlock( char * string, HB_SIZE nLen, int iFlags, HB_CO { PHB_EXPR pExpr; - HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewCodeBlock(%s,%" HB_PFS "u,%d,%p)", string, nLen, iFlags, ( void * ) HB_COMP_PARAM ) ); + HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewCodeBlock(%s,%" HB_PFS "u,%d,%p)", string ? string : "(null)", nLen, iFlags, ( void * ) HB_COMP_PARAM ) ); pExpr = HB_COMP_EXPR_NEW( HB_ET_CODEBLOCK ); diff --git a/src/pp/hbpp.c b/src/pp/hbpp.c index d7482aac98..03fbcadf29 100644 --- a/src/pp/hbpp.c +++ b/src/pp/hbpp.c @@ -350,7 +350,7 @@ static int hb_pp_generateVerInfo( char * szVerFile, " * and is covered by the same license as Harbour PP\n" " */\n\n" ); - fprintf( fout, "#define HB_VER_REVID %" PFHL "ulu\n", nRevID ); + fprintf( fout, "#define HB_VER_REVID %lulu\n", ( HB_ULONG ) nRevID ); if( szChangeLogID ) { diff --git a/src/rtl/gtdos/gtdos.c b/src/rtl/gtdos/gtdos.c index 68b52f4eae..c3cdbe6848 100644 --- a/src/rtl/gtdos/gtdos.c +++ b/src/rtl/gtdos/gtdos.c @@ -804,7 +804,7 @@ static void hb_gt_dos_mouse_GetBounds( PHB_GT pGT, int * piTop, int * piLeft, in static void hb_gt_dos_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFilenoStdout, HB_FHANDLE hFilenoStderr ) { - HB_TRACE( HB_TR_DEBUG, ( "hb_gt_dos_Init(%p,%d,%d,%d)", ( void * ) pGT, ( void * ) ( HB_PTRUINT ) hFilenoStdin, ( void * ) ( HB_PTRUINT ) hFilenoStdout, ( void * ) ( HB_PTRUINT ) hFilenoStderr ) ); + HB_TRACE( HB_TR_DEBUG, ( "hb_gt_dos_Init(%p,%p,%p,%p)", ( void * ) pGT, ( void * ) ( HB_PTRUINT ) hFilenoStdin, ( void * ) ( HB_PTRUINT ) hFilenoStdout, ( void * ) ( HB_PTRUINT ) hFilenoStderr ) ); s_bBreak = HB_FALSE; diff --git a/src/rtl/langapi.c b/src/rtl/langapi.c index 3ff3dd74f9..297f3e55ca 100644 --- a/src/rtl/langapi.c +++ b/src/rtl/langapi.c @@ -396,7 +396,7 @@ const char * hb_langGetItem( const char * pszID, int iIndex ) { PHB_LANG lang; - HB_TRACE( HB_TR_DEBUG, ( "hb_langGetItem(%s,%i)", pszID, iIndex ) ); + HB_TRACE( HB_TR_DEBUG, ( "hb_langGetItem(%s,%i)", pszID ? pszID : "(null)", iIndex ) ); lang = pszID ? hb_langFind( pszID ) : hb_vmLang(); if( lang && iIndex >= 0 && iIndex < HB_LANG_ITEM_MAX_ ) diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index 795b720510..828a1ee159 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -9130,7 +9130,9 @@ STATIC PROCEDURE dep_try_detection( hbmk, dep ) IF ! dep[ _HBMKDEP_lDetected ] dep_postprocess_one( hbmk, dep ) - IF dep[ _HBMKDEP_cControl ] == "local" .OR. ! dep_try_pkg_detection( hbmk, dep ) + IF dep[ _HBMKDEP_cControl ] == "local" .OR. ; + ( ! Empty( dep[ _HBMKDEP_aINCPATH ] ) .AND. dep[ _HBMKDEP_aINCPATH ][ 1 ] == dep[ _HBMKDEP_cControl ] ) .OR. ; + ! dep_try_pkg_detection( hbmk, dep ) dep_try_header_detection( hbmk, dep ) ENDIF dep[ _HBMKDEP_lDetected ] := .T.