Repository navigation
Conversation
…og(). The Makefile and CMakeLists.txt defined openlog() and closelog() as macros for lsyslog.c. <syslog.h> already gives both, so the macros are not necessary. When <syslog.h> declares them as functions, the macros break the declarations and lsyslog.c does not compile. Remove the macros. lsyslog.c then uses openlog() and closelog() of <syslog.h>. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
Contributor
|
This one depends on apache/nuttx#21128 right? If yes, not sure if providing fake function stubs that are declared as supported and implemented is the way to go. In LUA here probably these stubs were used to fix build issues. But how does that look on a working environment (i.e. Liunux)? |
Contributor
Author
|
It does not depend on it: this PR builds with the current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Makefile and CMakeLists.txt of
interpreters/luamodules/luasyslogdefinedopenlog()andcloselog()as macros forlsyslog.c.<syslog.h>already gives both, so these macros are not necessary. apache/nuttx#21128 makesopenlog()andcloselog()functions of libc; then the macros expand inside the declarations of<syslog.h>, andlsyslog.cdoes not compile.This PR removes the macros.
lsyslog.cthen usesopenlog()andcloselog()of<syslog.h>.Impact
Only the build of the luasyslog Lua module (sim:lua). It works with the current
<syslog.h>(macros) and with the new one (functions), so this PR can merge first.Testing
sim:lua (macOS host) with this PR and apache/nuttx#21128 builds and links
lsyslog.c. A file with theopenlog()/closelog()calls oflsyslog.c, compiled without the macros against<syslog.h>of nuttx master and of apache/nuttx#21128: both compile. With the macros, it does not compile against apache/nuttx#21128.tools/checkpatch.sh -c -u -m -gpasses.