This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

conflict wrt. sigcontext definitions and use

include/signal.h unconditionally references "struct sigcontext" via
the argument to __sigreturn().

It gets the structure definition via it's signal/signal.h include.

However, down in that include chain, sigcontext will only end up being
defined if __USE_MISC is defined.

For me on sparc this results in the build of stdio-common/scanf15.c
failing with:

In file included from ../misc/sys/param.h:28:0,
                 from ../include/sys/param.h:1,
                 from ../sysdeps/unix/sysv/linux/sparc/lowlevellock.h:23,
                 from ../sysdeps/nptl/bits/stdio-lock.h:23,
                 from ../libio/libio.h:149,
                 from ../libio/stdio.h:74,
                 from scanf15.c:10:
../include/signal.h:44:32: error: ʽstruct sigcontextʼ declared inside parameter list [-Werror]
../include/signal.h:44:32: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
cc1: all warnings being treated as errors

Any suggestions?  Is protecting the __sigreturn() declaration with
__USE_MISC the right thing to do?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]