diff options
| author | Warner Losh <imp@FreeBSD.org> | 2001-03-05 04:08:46 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2001-03-05 04:08:46 +0000 |
| commit | f82fe43c227ca55a4e51a3bf05d8a3ef3411bb79 (patch) | |
| tree | 115e6606a8db0878b6758ea6536116a10a0a5c4a /lib/libc/stdio | |
| parent | 4afbf682221e205b1e25510b7be18fa6266502b4 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio')
| -rw-r--r-- | lib/libc/stdio/findfp.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c index 3cc08a94c56b..f36b0444ea10 100644 --- a/lib/libc/stdio/findfp.c +++ b/lib/libc/stdio/findfp.c @@ -74,6 +74,26 @@ FILE __sF[3] = { }; struct glue __sglue = { &uglue, 3, __sF }; +/* + * The following kludge is done to ensure enough binary compatibility + * with future versions of libc. Or rather it allows us to work with + * libraries that have been built with a newer libc that defines these + * symbols and expects libc to provide them. We only have need to support + * i386 and alpha because they are the only "old" systems we have deployed. + */ +#if defined(__i386__) +#define FILE_SIZE 88 +#elif defined(__alpha__) +#define FILE_SIZE 152 +#endif +#ifndef FILE_SIZE +#error "You must define FILE_SIZE for this platform" +#endif +#define X(loc, sym) __strong_reference(loc, sym) +X(__sF + FILE_SIZE * 0, __stdin); +X(__sF + FILE_SIZE * 1, __stdout); +X(__sF + FILE_SIZE * 2, __stderr); + static struct glue * moreglue __P((int)); static spinlock_t thread_lock = _SPINLOCK_INITIALIZER; |
