Guest User

wrong signal.h

a guest
Nov 9th, 2024
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | Source Code | 0 0
  1. > cat sigtissue.c
  2. #include <signal.h>
  3. int main(int argc, char **argv)
  4. {
  5. sig_t T = (sig_t)0;
  6. return 0;
  7. }
  8. > gcc --version
  9. gcc.exe (Rev2, Built by MSYS2 project) 14.2.0
  10. Copyright (C) 2024 Free Software Foundation, Inc.
  11. This is free software; see the source for copying conditions. There is NO
  12. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13.  
  14. > gcc -o sigtissue sigtissue.c
  15. sigtissue.c: In function 'main':
  16. sigtissue.c:5:9: error: unknown type name 'sig_t'; did you mean 'size_t'?
  17. 5 | sig_t T = (sig_t)0;
  18. | ^~~~~
  19. | size_t
  20. sigtissue.c:5:20: error: 'sig_t' undeclared (first use in this function); did you mean 'size_t'?
  21. 5 | sig_t T = (sig_t)0;
  22. | ^~~~~
  23. | size_t
  24. sigtissue.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
  25. sigtissue.c:5:26: error: expected ',' or ';' before numeric constant
  26. 5 | sig_t T = (sig_t)0;
  27. | ^
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment