diff --git a/ChangeLog.txt b/ChangeLog.txt index aa6f9e40de..e2febdcc7a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,18 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2025-01-24 15:02 UTC+0100 Aleksander Czajczynski (hb fki.pl) + * contrib/hbct/dattime3.c + ! fixed in block variable declaration for strict ANSI C compat + * code formatting + ; both borrowed from Viktor's fork, thanks + https://github.com/vszakats/hb/commit/aa4665f16ff92443681fc0b7a2f4a6bd67c6a199 + https://github.com/vszakats/hb/commit/d9f37296b01bb5a5fef1afb50c91ec0ed4fe900e + + * src/rdd/dbcmd.c + * note about C5.3/5.2 DBAPPEND( [=.t.] ) updated again + upon Przemek notification, thanks + 2025-01-24 13:28 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * .github/workflows/vm1-ci.yml * switched the runner from macos-latest to ubuntu-latest diff --git a/contrib/hbct/dattime3.c b/contrib/hbct/dattime3.c index f3e7470718..a68aa26794 100644 --- a/contrib/hbct/dattime3.c +++ b/contrib/hbct/dattime3.c @@ -154,13 +154,15 @@ HB_FUNC( SETTIME ) lNewTime = iTime[ 0 ] * 3600 + iTime[ 1 ] * 60 + iTime[ 2 ]; tm = time( NULL ); tm += lNewTime - ( tm % 86400 ); -# if ( defined( __GLIBC__ ) && ( ( __GLIBC__ > 2 ) || ( ( __GLIBC__ == 2 ) && ( __GLIBC_MINOR__ >= 31 ) ) ) ) - /* stime() is deprecated in glibc 2.31+ */ - struct timespec ts = { tm, 0 }; - fResult = clock_settime( CLOCK_REALTIME, &ts ) == 0; +# if defined( __GLIBC__ ) && ( ( __GLIBC__ > 2 ) || ( ( __GLIBC__ == 2 ) && ( __GLIBC_MINOR__ >= 31 ) ) ) + { + /* stime() is deprecated in glibc 2.31+ */ + struct timespec ts = { tm, 0 }; + fResult = clock_settime( CLOCK_REALTIME, &ts ) == 0; + } # else /* stime() exists only in SVr4, SVID, X/OPEN and Linux */ - fResult = stime( &tm ) == 0; + fResult = stime( &tm ) == 0; # endif #endif } @@ -191,12 +193,12 @@ HB_FUNC( SETDATE ) #elif defined( HB_OS_LINUX ) && ! defined( HB_OS_ANDROID ) && ! defined( __WATCOMC__ ) /* stime() exists only in SVr4, SVID, X/OPEN and Linux */ long lNewDate = lDate - hb_dateEncode( 1970, 1, 1 ); -# if ( defined( __GLIBC__ ) && ( ( __GLIBC__ > 2 ) || ( ( __GLIBC__ == 2 ) && ( __GLIBC_MINOR__ >= 31 ) ) ) ) +# if defined( __GLIBC__ ) && ( ( __GLIBC__ > 2 ) || ( ( __GLIBC__ == 2 ) && ( __GLIBC_MINOR__ >= 31 ) ) ) /* stime() is deprecated in glibc 2.31+ */ struct timespec ts = { 0 }; - clock_gettime(CLOCK_REALTIME, &ts); /* keep tv_nsec */ + clock_gettime( CLOCK_REALTIME, &ts ); /* keep tv_nsec */ ts.tv_sec = lNewDate * 86400 + ( ts.tv_sec % 86400 ); - fResult = clock_settime( CLOCK_REALTIME, &ts ) == 0; + fResult = clock_settime( CLOCK_REALTIME, &ts ) == 0; # else time_t tm; tm = time( NULL ); diff --git a/src/rdd/dbcmd.c b/src/rdd/dbcmd.c index 6962b07446..9d97d8f92d 100644 --- a/src/rdd/dbcmd.c +++ b/src/rdd/dbcmd.c @@ -264,7 +264,11 @@ HB_FUNC( DBAPPEND ) if( pArea ) { - /* NOTE: parameter is Clipper 5.3 extension, 5.2 always unlocks */ + /* + * NOTE: parameter exists both in Clipper 5.3 and 5.2, + * though in 5.2 it is poorly documented, mentioned only in Drivers + * Guide manual - both printed (1992) and C52G07B.NG + */ HB_BOOL bUnLockAll = hb_parldef( 1, HB_TRUE ); HB_ERRCODE errCode;