-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PORT: Make cmake test for signal handler compatible with c23
- Loading branch information
1 parent
a3601d6
commit 6de08cb
Showing
2 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ | |
# undef signal | ||
#endif | ||
#ifdef __cplusplus | ||
extern "C" void (*signal (int, void (*)(int)))(int); | ||
extern "C" | ||
#else | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JanWielemaker
Author
Member
|
||
void (*signal ()) (); | ||
void ( *signal(int signum, void (*handler)(int)) ) (int); | ||
#endif | ||
|
||
int | ||
main () | ||
main(int argc, char **argv) | ||
{ | ||
return 0; | ||
} |
This file contains 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
This line should be
#endif
instead of#else
(and the#endif
2 lines below should be removed), right? The way this is written now, in C++ mode, the code ends up becomingextern "C" int main(...) ...
with no declaration ofsignal
at all. I assume that's not the intended meaning.