diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-21 22:58:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-21 22:58:23 +0000 |
commit | 01cad722667c7b25535b2d248598f3d535e7caa9 (patch) | |
tree | 606a2436a10d7d48fcbb3e1097500d8a0b8144d1 /misc/sys | |
parent | 28f1c862ddaa3515d0f74102379301048c76cf0f (diff) | |
download | glibc-01cad722667c7b25535b2d248598f3d535e7caa9.tar glibc-01cad722667c7b25535b2d248598f3d535e7caa9.tar.gz glibc-01cad722667c7b25535b2d248598f3d535e7caa9.tar.bz2 glibc-01cad722667c7b25535b2d248598f3d535e7caa9.zip |
Update.
1998-04-21 21:49 Zack Weinberg <zack@rabi.phys.columbia.edu>
* misc/sys/cdefs.h: New macro __REDIRECT to support changing the
asm symbol name of functions.
* include/features.h: Kill redundant test.
* dirent/dirent.h: Use new macros to implement __USE_FILE_OFFSET64.
* io/ftw.h: Likewise.
* io/sys/stat.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/sys/statvfs.h: Likewise.
* libio/stdio.h: Likewise.
* resource/sys/resource.h: Likewise.
* rt/aio.h: Likewise.
* posix/unistd.h: Use new macros for __USE_FILE_OFFSET64 and
__FAVOR_BSD.
* signal/signal.h: Use new macros for BSD vs. SysV signal().
* misc/Makefile: Drop bsd-compat.c. Make libbsd-compat.a
a dummy library.
* misc/bsd-compat.c: Removed.
Diffstat (limited to 'misc/sys')
-rw-r--r-- | misc/sys/cdefs.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 5f40a0a45d..c0c442e011 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -95,15 +95,39 @@ # define __END_DECLS #endif -/* GCC2 has various useful declarations that can be made with the +/* __asm__ ("xyz") is used throughout the headers to rename functions + at the assembly language level. This is wrapped by the __REDIRECT + macro, in order to support compilers that can do this some other + way. When compilers don't support asm-names at all, we have to do + preprocessor tricks instead (which don't have exactly the right + semantics, but it's the best we can do). + + Example: + int __REDIRECT(setpgrp, __P((__pid_t pid, __pid_t pgrp)), setpgid); */ + +#if defined __GNUC__ && __GNUC__ >= 2 + +# define __REDIRECT(name, proto, asname) name proto __asm__ (#asname) + +/* +#elif __SOME_OTHER_COMPILER__ + +# define __attribute__(xyz) +# define __ALIAS(name, proto, asname) name proto; \ + _Pragma("let " #name " = " #asname) +*/ +#endif + +/* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ + they are omitted for compilers that don't understand it. */ #if !defined __GNUC__ || __GNUC__ < 2 -# define __attribute__(xyz) /* Ignore. */ -#endif +# define __attribute__(xyz) /* Ignore. */ + +#endif -/* For now no version of gcc knows the `restrict' keyword. Define it +/* No current version of gcc knows the `restrict' keyword. Define it for now unconditionally to the empty string. */ #define __restrict |