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
      aa4665f16f
      d9f37296b0

  * src/rdd/dbcmd.c
    * note about C5.3/5.2 DBAPPEND( [<lUnlockAll>=.t.] ) updated again
      upon Przemek notification, thanks
This commit is contained in:
Aleksander Czajczynski
2025-01-24 15:02:38 +01:00
parent 8d5afdcac1
commit a30e2091db
3 changed files with 27 additions and 9 deletions

View File

@@ -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( [<lUnlockAll>=.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

View File

@@ -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 );

View File

@@ -264,7 +264,11 @@ HB_FUNC( DBAPPEND )
if( pArea )
{
/* NOTE: parameter is Clipper 5.3 extension, 5.2 always unlocks */
/*
* NOTE: <lUnlockAll> 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;