about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/errnos.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-03-11 21:28:28 +0000
committerRoland McGrath <roland@gnu.org>2002-03-11 21:28:28 +0000
commit7d55d698b81d858fac3b5e0dcde8bb2a6db70858 (patch)
treefa860fea69196a3988ebda4f10437a64c2ff94eb /sysdeps/mach/hurd/errnos.awk
parent1396cb052d732254a453dae00c29f3a075a90cb3 (diff)
downloadglibc-7d55d698b81d858fac3b5e0dcde8bb2a6db70858.tar.gz
glibc-7d55d698b81d858fac3b5e0dcde8bb2a6db70858.tar.xz
glibc-7d55d698b81d858fac3b5e0dcde8bb2a6db70858.zip
2002-03-11 Roland McGrath <roland@frob.com>
	* Versions.def (libc): Add GLIBC_2.2.6.
	* hurd/Versions (libc: GLIBC_2.2.6): Add __errno_location.
	* sysdeps/mach/hurd/errnos.awk: In generated macro, use
	__errno_location instead of __hurd_errno_location, and don't inline it.
	* sysdeps/mach/hurd/bits/errno.h: Regenerated.
	* hurd/errno.c: New file.
	* hurd/Makefile (routines): Add errno.
Diffstat (limited to 'sysdeps/mach/hurd/errnos.awk')
-rw-r--r--sysdeps/mach/hurd/errnos.awk16
1 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
index cd356e7fb9..b3ac216017 100644
--- a/sysdeps/mach/hurd/errnos.awk
+++ b/sysdeps/mach/hurd/errnos.awk
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,92,93,94,95,96,97,2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1991,92,93,94,95,96,97,2000,01,02
+#	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -153,11 +154,14 @@ END \
     print "#define __error_t_defined\t1"
     print "#endif";
     print "";
-    print "/* errno is a per-thread variable.  */";
-    print "#include <hurd/threadvar.h>";
-    print "#define errno	(*__hurd_errno_location ())";
-    print "#define __set_errno(val) errno = (val)";
-    print "";
+    print "\
+/* Return the current thread's location for `errno'.\n\
+   The syntax of this function allows redeclarations like `int errno'.  */\n\
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));\n\
+\n\
+#define errno			(*__errno_location ())\n\
+#define __set_errno(val)	(errno = (val))\n\
+";
     print "#endif /* <errno.h> included.  */";
     print "";
     print "#if !defined (_ERRNO_H) && defined (__need_Emath)";