Skip to content

[libc][signal] fix declaration of sighandler_t #125598

@nickdesaulniers

Description

@nickdesaulniers

cross compiling our unit tests (built hermetically) with llvm-libc fails with:

llvm-project/libc/test/UnitTest/FPExceptMatcher.cpp:40:3: error: unknown type name 'sighandler_t'; did you mean '__sighandler_t'?
   40 |   sighandler_t oldSIGFPEHandler = signal(SIGFPE, &sigfpeHandler);
      |   ^~~~~~~~~~~~
      |   __sighandler_t
llvm-project/build_aarch64/libc/include/llvm-libc-types/struct_sigaction.h:28:16: note: '__sighandler_t' declared here
   28 | typedef void (*__sighandler_t)(int);
      |                ^

it looks like our generated signal.h defines sighandler_t with two leading underscores (for some reason, 215c9fa seems related). Whatever the problem was should be revisited.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions