diff options
author | Nick Clifton <nickc@redhat.com> | 2003-06-06 15:36:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-06-06 15:36:31 +0000 |
commit | 75d7d177004358ba5e410a2cd98f2249b6c4e1b3 (patch) | |
tree | fc1541e54ea04ed5a4260fbc60e578424945e2ef /newlib/libc/include | |
parent | 54152c7e7ed656c969fe4536f17f66360cd8d971 (diff) | |
download | cygnal-75d7d177004358ba5e410a2cd98f2249b6c4e1b3.tar.gz cygnal-75d7d177004358ba5e410a2cd98f2249b6c4e1b3.tar.bz2 cygnal-75d7d177004358ba5e410a2cd98f2249b6c4e1b3.zip |
New structure containing fields used by the on_exit() function.
(struct _atexit): Include struct _on_exit_args. For _REENT_SMALL do his via a
pointer that is initialised when needed.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/sys/reent.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 2d6ce4146..d1a04dc43 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -64,20 +64,24 @@ struct __tm #define _ATEXIT_SIZE 32 /* must be at least 32 to guarantee ANSI conformance */ -#ifndef _REENT_SMALL +struct _on_exit_args { + void * _fnargs[_ATEXIT_SIZE]; /* fn args for on_exit */ + __ULong _fntypes; /* type of exit routine - + Must have at least _ATEXIT_SIZE bits */ +}; + +#ifdef _REENT_SMALL struct _atexit { - struct _atexit *_next; /* next in list */ int _ind; /* next index in this table */ void (*_fns[_ATEXIT_SIZE])(void); /* the table itself */ - void *_fnargs[_ATEXIT_SIZE]; /* fn args for on_exit */ - __ULong _fntypes; /* type of exit routine */ + struct _on_exit_args * _on_exit_args_ptr; }; #else struct _atexit { + struct _atexit *_next; /* next in list */ int _ind; /* next index in this table */ void (*_fns[_ATEXIT_SIZE])(void); /* the table itself */ - void *_fnargs[_ATEXIT_SIZE]; /* fn args for on_exit */ - __ULong _fntypes; /* type of exit routine */ + struct _on_exit_args _on_exit_args; }; #endif |