Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
From: Khem Raj <[email protected]>
__BEGIN_DECLS and __END_DECLS definitions are missing (at least) in musl libc.
Issue was reported in openembedded-core project [1] and netinet/sctp.h was fixed in upstream [2].
[1] http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
[2] https://github.com/sctp/lksctp-tools/commit/1329bea90f55d3e69820cfb5203b53794d4c6bc0
---
NOTE: removed this from commit:
Include <asm-generic/types.h> to get __s32 definitions its not a generally available typedef
Kind regards,
Petr
--- testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------ utils/sctp/include/netinet/sctp.h | 8 +- 4 files changed, 2812 insertions(+), 3190 deletions(-)
testcases/kernel/syscalls/epoll2/include/epoll.h +6 -2
@@ -85,7 +85,9 @@ struct epoll_event }EPOLL_PACKED ; -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif /* Creates an epoll instance. Returns an fd for the new instance. The "size" parameter is a hint specifying the number of file
@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd, extern int epoll_wait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout) __THROW; -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* sys/epoll.h */
utils/ffsb-6.0-rc2/config.h.in +33 -16
68 lines not on this page · raw message
utils/ffsb-6.0-rc2/configure +2767 -3170
2,913 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.16.1
Part of the diff is not shown here. View the raw message.
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
Hi!
Quoted 3 lines
testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------
^
This does not look like intended change, can you please revert the patch and apply clean version?
(Have you used git commit -a by mistake?)
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
Hi Cyril,
Quoted 8 lines
Quoted 3 lines
testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------^
This does not look like intended change, can you please revert the patch and apply clean version?(Have you used git commit -a by mistake?)
I'm sorry for mistake. I reverted it and commit again.
I wish there was a commit of ffsb configure files with recent/common autotools version as I keep reverting them often. But it's a question, what is common autotools version.
Kind regards,
Petr
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
Hi!
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------^
This does not look like intended change, can you please revert the patch and apply clean version?(Have you used git commit -a by mistake?)
I'm sorry for mistake. I reverted it and commit again.
No problem at all.
Quoted 2 lines
I wish there was a commit of ffsb configure files with recent/common autotools version as I keep reverting them often. But it's a question, what is common autotools version.
Looked shortly into the problem, it looks like the problem is Makefile generated by automake decides to regenerate configure script because timestamps are not preserved on git checkout and the build system thinks that configure script is out of date since it's older than the files it has been generated from. Looks like this is a common problem see:
https://www.gnu.org/software/automake/manual/html_node/CVS.html
One of the solutions would be to regenerate the configure with AM_MAINTAINER_MODE() which should disable the automagic regeneration.
Also side note, I've learned not to use git commit -a after one of the screw ups or at least check the resulting patch for unintended changes.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
Hi Cyril,
Quoted 21 lines
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------^
This does not look like intended change, can you please revert the patch and apply clean version?(Have you used git commit -a by mistake?)
I'm sorry for mistake. I reverted it and commit again.
No problem at all.
Quoted 2 lines
I wish there was a commit of ffsb configure files with recent/common autotools version as I keep reverting them often. But it's a question, what is common autotools version.
Looked shortly into the problem, it looks like the problem is
Makefilegenerated by automake decides to regenerate configure script because timestamps are not preserved on git checkout and the build system thinks that configure script is out of date since it's older than the files it has been generated from. Looks like this is a common problem see:
Quoted 4 lines
https://www.gnu.org/software/automake/manual/html_node/CVS.html
One of the solutions would be to regenerate the configure with
AM_MAINTAINER_MODE()which should disable the automagic regeneration.
Thanks for investigation! I'm for using it (better than have some scripts like gcc folks as mentioned there as an alternative).
Quoted 2 lines
Also side note, I've learned not to use git commit -a after one of the screw ups or at least check the resulting patch for unintended changes.
Well, I wasn't using '-a' switch. Custom function is sometimes even worse than '-a' switch :-).
Kind regards,
Petr
PATCH 1/1 Replace __BEGIN_DECLS and __END_DECLS to with expanded macros
In reply to Cyril HrubisHi Cyril,
Quoted 21 lines
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
testcases/kernel/syscalls/epoll2/include/epoll.h | 8 +- utils/ffsb-6.0-rc2/config.h.in | 49 +- utils/ffsb-6.0-rc2/configure | 5937 ++++++++++------------^
This does not look like intended change, can you please revert the patch and apply clean version?(Have you used git commit -a by mistake?)
I'm sorry for mistake. I reverted it and commit again.
No problem at all.
Quoted 2 lines
I wish there was a commit of ffsb configure files with recent/common autotools version as I keep reverting them often. But it's a question, what is common autotools version.
Looked shortly into the problem, it looks like the problem is
Makefilegenerated by automake decides to regenerate configure script because timestamps are not preserved on git checkout and the build system thinks that configure script is out of date since it's older than the files it has been generated from. Looks like this is a common problem see:
Quoted 4 lines
https://www.gnu.org/software/automake/manual/html_node/CVS.html
One of the solutions would be to regenerate the configure with
AM_MAINTAINER_MODE()which should disable the automagic regeneration.
Tested and pushed as 427b1be9c ("configure.ac: Enable maintainer mode").
Kind regards,
Petr