From: Roland McGrath Date: Mon, 11 Mar 2002 21:26:46 +0000 (+0000) Subject: 2002-03-11 Roland McGrath X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00eaa2ecf4a23217407849cd8c7e24208bd6e575;p=thirdparty%2Fglibc.git 2002-03-11 Roland McGrath * 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 * sysdeps/mach/hurd/errnos.awk: Tighten up device_types.h matching. --- diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk index f670b24afb2..b3ac2160172 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 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 "; - 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 /* included. */"; print ""; print "#if !defined (_ERRNO_H) && defined (__need_Emath)";