summary refs log tree commit diff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-27 09:23:13 +0000
committerRoland McGrath <roland@gnu.org>2002-08-27 09:23:13 +0000
commitb88ac073ae7110a56b5e4537576fb2475b9fb220 (patch)
tree9c9b04ae80891e6ed48dd27f424f861ccdbbaaf1 /include/libc-symbols.h
parent4022d8ed0374121e9f08aaaf657276de0e7642ed (diff)
downloadglibc-b88ac073ae7110a56b5e4537576fb2475b9fb220.tar.gz
glibc-b88ac073ae7110a56b5e4537576fb2475b9fb220.tar.xz
glibc-b88ac073ae7110a56b5e4537576fb2475b9fb220.zip
* manual/errno.texi (Error Codes): Added ECANCELED (118 for Hurd).
	* sysdeps/mach/hurd/bits/errno.h: Regenerated.

	* sysdeps/gnu/Versions: New file.
	* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.1): Remove
	_sys_errlist; sys_errlist; _sys_nerr; sys_nerr; from here.
	* sysdeps/gnu/Makefile ($(..)sysdeps/gnu/errlist-compat.c): New target.
	($(objpfx)errlist.d): Depend on $(..)sysdeps/gnu/errlist-compat.c.
	* sysdeps/gnu/errlist.awk: Make output define _sys_errlist_internal
	and _sys_nerr_internal instead of anything else.  Make it include
	"errlist-compat.c" if [!NOT_IN_libc && !ERRLIST_NO_COMPAT].
	Make it emit some asm magic if [EMIT_ERR_MAX].
	* sysdeps/gnu/errlist.c: Regenerated.
	* sysdeps/gnu/errlist-compat.awk: New file.
	* sysdeps/gnu/errlist-compat.c: New file (generated).
	* sysdeps/mach/hurd/errlist.c (ERRLIST_NO_COMPAT): New macro.
	(_sys_errlist_internal): Define this as	a macro for _hurd_errlist.
	(_sys_nerr_internal): Define this is a macro for _hurd_nerr.
	(SYS_ERRLIST, SYS_NERR): Macros removed.
	(sys_nerr, _sys_nerr): Remove these weak aliases.
	* sysdeps/unix/sysv/linux/errlist.c: File removed.
	* sysdeps/unix/sysv/linux/errlist.h: File removed.
	* sysdeps/unix/sysv/linux/arm/errlist.c: File removed.

	* include/libc-symbols.h (declare_symbol): New macro.
	* config.h.in (ASM_TYPE_DIRECTIVE_PREFIX): New #undef.
	* configure.in: New check to define it.
	* configure: Regenerated.
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index dcc4712f7d..bf77fda8d6 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -29,6 +29,8 @@
 
    * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
    * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
+   * ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
+     or leave it undefined if there is no .type directive.
    * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
    and for symbol set and warning messages extensions in a.out and ELF.
    * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
@@ -244,6 +246,34 @@
   link_warning (name, \
 		"warning: " #name " is not implemented and will always fail")
 
+
+/* Declare SYMBOL to be TYPE (`function' or `object') and of SIZE bytes,
+   when the assembler supports such declarations (such as in ELF).
+   This is only necessary when defining something in assembly, or playing
+   funny alias games where the size should be other than what the compiler
+   thinks it is.  */
+#define declare_symbol(symbol, type, size) \
+  declare_symbol_1 (symbol, type, size)
+#ifdef ASM_TYPE_DIRECTIVE_PREFIX
+# ifdef __ASSEMBLER__
+#  define declare_symbol_1(symbol, type, size) \
+    .type C_SYMBOL_NAME (symbol), \
+	  declare_symbol_1_paste (ASM_TYPE_DIRECTIVE_PREFIX, type), size
+#  define declare_symbol_1_paste(a, b)	declare_symbol_1_paste_1 (a,b)
+#  define declare_symbol_1_paste_1(a,b)	a##b
+# else /* Not __ASSEMBLER__.  */
+#  define declare_symbol_1(symbol, type, size) \
+    asm (".type " __SYMBOL_PREFIX #symbol \
+	 declare_symbol_1_stringify (ASM_TYPE_DIRECTIVE_PREFIX) #type \
+	 "\n\t.size " __SYMBOL_PREFIX #symbol ", " #size);
+#  define declare_symbol_1_stringify(x) declare_symbol_1_stringify_1 (x)
+#  define declare_symbol_1_stringify_1(x) #x
+# endif /* __ASSEMBLER__ */
+#else
+# define declare_symbol_1(symbol, type, size) /* Nothing.  */
+#endif
+
+
 /*
 
 */