summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/bits
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-08-29 12:06:14 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-08-29 12:22:30 +0200
commit883359805325a82f4f291ff85624f141f6c93636 (patch)
tree8e263430aeaf929600d2e734b159f8686ae97c70 /sysdeps/mach/hurd/bits
parented479b02c2b04291d07708baf50bc6d2929f8b94 (diff)
downloadglibc-883359805325a82f4f291ff85624f141f6c93636.tar.gz
Hurd: Add ESUCCESS error_t value.
Diffstat (limited to 'sysdeps/mach/hurd/bits')
-rw-r--r--sysdeps/mach/hurd/bits/errno.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/bits/errno.h b/sysdeps/mach/hurd/bits/errno.h
index 3b6fe76b37..d20ffe654a 100644
--- a/sysdeps/mach/hurd/bits/errno.h
+++ b/sysdeps/mach/hurd/bits/errno.h
@@ -9,6 +9,14 @@
enum __error_t_codes
{
+ /* The value zero always means success and it is perfectly fine for
+ code to use 0 explicitly (or implicitly, e.g. via Boolean coercion).
+ Having an enum entry for zero both makes the debugger print the name
+ for error_t-typed zero values, and prevents the compiler from
+ issuing warnings about 'case 0:' in a switch on an error_t-typed
+ value. */
+ ESUCCESS = 0,
+
#undef EDOM
#undef ERANGE
EPERM = _HURD_ERRNO (1),
@@ -151,7 +159,7 @@ enum __error_t_codes
EDQUOT = _HURD_ERRNO (69),
#define EDQUOT _HURD_ERRNO (69)/* Disk quota exceeded */
ESTALE = _HURD_ERRNO (70),
-#define ESTALE _HURD_ERRNO (70)/* Stale NFS file handle */
+#define ESTALE _HURD_ERRNO (70)/* Stale file handle */
EREMOTE = _HURD_ERRNO (71),
#define EREMOTE _HURD_ERRNO (71)/* Object is remote */
EBADRPC = _HURD_ERRNO (72),