-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arc4 compilation debian #343
base: main
Are you sure you want to change the base?
Conversation
…etdate.c, settime.c, and arc4.c
- Replaced hb_langSelect with __hb_langSelect to prevent crashes during repetitive tests.
Revert to previous version of: contrib/hbtest/tests/test.prg
modified: src/rtl/arc4.c
fcf9b65
to
a22b0ea
Compare
@@ -149,41 +149,42 @@ HB_FUNC( FBCREATEDB ) | |||
hb_retnl( 0 ); | |||
} | |||
|
|||
HB_FUNC( FBCONNECT ) | |||
HB_FUNC(FBCONNECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd make it easier to review and merge without formatting/comment changes to existing code.
len = (int)(sizeof(dpb) - i - 2); | ||
i += hb_snprintf(dpb + i, sizeof(dpb) - i, "%c", (char)len); | ||
hb_strncpy(&(dpb[i]), passwd, len); | ||
i += (short)len; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the above hb_snprintf()
calls be made fewer or into a single one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a fix for this that uses a single call. Untested.
@@ -1,4 +1,5 @@ | |||
/* Rewritten in 2012 by Viktor Szakats and kept in the | |||
/* | |||
* Rewritten in 2012 by Viktor Szakats and kept in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change.
@@ -1,4 +1,5 @@ | |||
/* Rewritten in 2012 by Viktor Szakats and kept in the | |||
/* | |||
* Rewritten in 2012 by Viktor Szakats and kept in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change.
cLangOld := hb_langSelect( "en" ) /* to always have RTEs in one language */ | ||
|
||
|
||
cLangOld := __hb_langSelect( "en" ) /* to always have RTEs in one language */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doing this change?
} | ||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Missing standard indentation and extra lines.
ts.tv_sec = mktime(tm_info); | ||
ts.tv_nsec = 0; | ||
|
||
fResult = clock_settime(CLOCK_REALTIME, &ts) == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a fixed for this.
ts.tv_sec = mktime(tm_info); | ||
ts.tv_nsec = 0; | ||
|
||
fResult = clock_settime(CLOCK_REALTIME, &ts) == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a patch for this, but it doesn't apply, not sure why.
Limited build-test only. Ref: #343
Purpose
This Pull Request addresses and fixes various compilation issues on Debian 12 systems related to ARC4 and time/date functions
Changes Made
arc4.c:
settime.c:
setdate.c:
dattime3.c:
firebird.c:
hb_snprintf
to prevent possible buffer overflow issues.Impact
These changes ensure that the code compiles correctly and operates smoothly on Debian 12 systems.
Tests Conducted