Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/include



On Jan 5,  2:54pm, M.Drochner%fz-juelich.de@localhost (Matthias Drochner) wrote:
-- Subject: Re: CVS commit: src/include

| 
| christos%NetBSD.org@localhost said:
| > Modified Files:
| >     src/include: signal.h
| > Log Message: Provide forward struct declarations for struct
| > sigcontext*;
| 
| As I see it, this should be done more radically.
| sigreturn() isn't supported for compilation from source
| anymore - it is just present for binary comaptibility in
| conjunction with a COMPAT_16 kernel. So neither sigreturn()
| nor sigcontext need to be exported to user programs.
| It might remain within __LIBC12_SOURCE__, but even that
| is unnecessary because there are only assembler stubs
| which implement sigreturn().
| (Actually, I missed that __HAVE_SIGINFO when I did some
| cleanup last year.)
| 
| > this will allow us to get rid of them in the machine/
| > signal.h files. 
| 
| What's the plan? I agree that the sigcontext defs are
| unnecessary outside of compat code.

My plan was (and you can modify it and implement it):

1. Make sure that the struct sigcontext* in the kernel MD files is
   only defined when (COMPAT_16 || _LIBC) is. It is unfortunate that
   we have to do this, but there is no way around it because of
   setjmp/longjmp.

2. Change signal.h to:

#ifdef _LIBC
struct sigcontext;
#ifdef __LIBC12_SOURCE__
struct sigcontext13;
int     sigreturn __P((struct sigcontext13 *));
int     __sigreturn14 __P((struct sigcontext *));
#else
int     sigreturn __P((struct sigcontext *)) __RENAME(__sigreturn14);
#endif          
#endif

So that sigreturn is only visible in libc. Even changing
'struct sigcontext.* \*' to 'void \*' should work since
libc does not need to know about the guts of sigcontext.

What do you think?

christos



Home | Main Index | Thread Index | Old Index