]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2002-03-11 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Mon, 11 Mar 2002 21:26:46 +0000 (21:26 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 11 Mar 2002 21:26:46 +0000 (21:26 +0000)
* 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.
2002-01-01  Roland McGrath  <roland@frob.com>

* sysdeps/mach/hurd/errnos.awk: Tighten up device_types.h matching.

sysdeps/mach/hurd/errnos.awk

index f670b24afb2a04622366b353f265215f1e82f126..b3ac2160172b715a111f95499196a75ef43d6021 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 1991,92,93,94,95,96,97,2000 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
@@ -113,7 +114,7 @@ in_mig_errors && $1 == "#endif" && $3 == "_MACH_MIG_ERRORS_H_" \
   }
 
 (in_mig_errors && $1 == "#define" && $3 <= -300) || \
-(in_device_errors && $1 == "#define") \
+(in_device_errors && $1 == "#define" && /D_/ && NF > 3) \
   {
     comment = "";
     for (i = 4; i <= NF; ++i)
@@ -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)";