aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-01-22 18:10:43 +0000
committerMark Kettenis <kettenis@gnu.org>2000-01-22 18:10:43 +0000
commitb2c4f1527f2d8a6731424ce009d8e604700e1043 (patch)
tree9d5b5ccf9ae27aa78bfc6bc43d26446132ef9464
parentb8a46c1d5abdbb5224e3f0776abbfd76a0820b41 (diff)
downloadglibc-b2c4f1527f2d8a6731424ce009d8e604700e1043.tar
glibc-b2c4f1527f2d8a6731424ce009d8e604700e1043.tar.gz
glibc-b2c4f1527f2d8a6731424ce009d8e604700e1043.tar.bz2
glibc-b2c4f1527f2d8a6731424ce009d8e604700e1043.zip
2000-01-05 Roland McGrath <roland@baalperazim.frob.com>
* sysdeps/mach/hurd/errnos.awk: Rediddle to collect lines and print them all at the end, eliding the final comma. * sysdeps/mach/hurd/bits/errno.h: Regenerated.
-rw-r--r--sysdeps/mach/hurd/bits/errno.h40
-rw-r--r--sysdeps/mach/hurd/errnos.awk31
2 files changed, 39 insertions, 32 deletions
diff --git a/sysdeps/mach/hurd/bits/errno.h b/sysdeps/mach/hurd/bits/errno.h
index b8d6038700..99d68b73ee 100644
--- a/sysdeps/mach/hurd/bits/errno.h
+++ b/sysdeps/mach/hurd/bits/errno.h
@@ -270,28 +270,28 @@ enum __error_t_codes
EKERN_TERMINATED = 26,
/* Errors from <mach/mig_errors.h>. */
- EMIG_TYPE_ERROR = -300, /* client type check failure */
- EMIG_REPLY_MISMATCH = -301, /* wrong reply message ID */
- EMIG_REMOTE_ERROR = -302, /* server detected error */
- EMIG_BAD_ID = -303, /* bad request message ID */
- EMIG_BAD_ARGUMENTS = -304, /* server type check failure */
- EMIG_NO_REPLY = -305, /* no reply should be sent */
- EMIG_EXCEPTION = -306, /* server raised exception */
- EMIG_ARRAY_TOO_LARGE = -307, /* array not large enough */
- EMIG_SERVER_DIED = -308, /* server died */
- EMIG_DESTROY_REQUEST = -309, /* destroy request with no reply */
+ EMIG_TYPE_ERROR = -300 /* client type check failure */,
+ EMIG_REPLY_MISMATCH = -301 /* wrong reply message ID */,
+ EMIG_REMOTE_ERROR = -302 /* server detected error */,
+ EMIG_BAD_ID = -303 /* bad request message ID */,
+ EMIG_BAD_ARGUMENTS = -304 /* server type check failure */,
+ EMIG_NO_REPLY = -305 /* no reply should be sent */,
+ EMIG_EXCEPTION = -306 /* server raised exception */,
+ EMIG_ARRAY_TOO_LARGE = -307 /* array not large enough */,
+ EMIG_SERVER_DIED = -308 /* server died */,
+ EMIG_DESTROY_REQUEST = -309 /* destroy request with no reply */,
/* Errors from <device/device_types.h>. */
- ED_IO_ERROR = 2500, /* hardware IO error */
- ED_WOULD_BLOCK = 2501, /* would block, but D_NOWAIT set */
- ED_NO_SUCH_DEVICE = 2502, /* no such device */
- ED_ALREADY_OPEN = 2503, /* exclusive-use device already open */
- ED_DEVICE_DOWN = 2504, /* device has been shut down */
- ED_INVALID_OPERATION = 2505, /* bad operation for device */
- ED_INVALID_RECNUM = 2506, /* invalid record (block) number */
- ED_INVALID_SIZE = 2507, /* invalid IO size */
- ED_NO_MEMORY = 2508, /* memory allocation failure */
- ED_READ_ONLY = 2509, /* device cannot be written to */
+ ED_IO_ERROR = 2500 /* hardware IO error */,
+ ED_WOULD_BLOCK = 2501 /* would block, but D_NOWAIT set */,
+ ED_NO_SUCH_DEVICE = 2502 /* no such device */,
+ ED_ALREADY_OPEN = 2503 /* exclusive-use device already open */,
+ ED_DEVICE_DOWN = 2504 /* device has been shut down */,
+ ED_INVALID_OPERATION = 2505 /* bad operation for device */,
+ ED_INVALID_RECNUM = 2506 /* invalid record (block) number */,
+ ED_INVALID_SIZE = 2507 /* invalid IO size */,
+ ED_NO_MEMORY = 2508 /* memory allocation failure */,
+ ED_READ_ONLY = 2509 /* device cannot be written to */
};
diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
index d40c369477..9ec02ca7a0 100644
--- a/sysdeps/mach/hurd/errnos.awk
+++ b/sysdeps/mach/hurd/errnos.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+# Copyright (C) 1991,92,93,94,95,96,97,2000 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
@@ -38,6 +38,7 @@ BEGIN {
in_math = 0;
edom = erange = "";
print "#undef EDOM\n#undef ERANGE";
+ lno = 0;
}
$1 == "@comment" && $2 == "errno.h" { errnoh=1; next }
@@ -56,7 +57,7 @@ errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" \
errnoh == 3 && $1 == "@comment" && $2 == "errno" {
if (e == "EWOULDBLOCK")
{
- print "#define EWOULDBLOCK EAGAIN /* Operation would block */";
+ lines[lno++]="#define EWOULDBLOCK EAGAIN /* Operation would block */";
next;
}
errno = $3 + 0;
@@ -70,8 +71,9 @@ errnoh == 3 && $1 == "@comment" && $2 == "errno" {
edom = x;
else if (e == "ERANGE")
erange = x;
- printf "\t%-16s= _HURD_ERRNO (%d),\n", e, errno;
- print x;
+ comma[lno] = 1;
+ lines[lno++] = sprintf("\t%-16s= _HURD_ERRNO (%d)", e, errno);
+ lines[lno++] = x;
next;
}
{ errnoh=0 }
@@ -79,12 +81,12 @@ errnoh == 3 && $1 == "@comment" && $2 == "errno" {
NF == 3 && $1 == "#define" && $2 == "MACH_SEND_IN_PROGRESS" \
{
in_mach_errors = FILENAME;
- print "\n\t/* Errors from <mach/message.h>. */";
+ lines[lno++] = "\n\t/* Errors from <mach/message.h>. */";
}
NF == 3 && $1 == "#define" && $2 == "KERN_SUCCESS" \
{
in_mach_errors = FILENAME;
- print "\n\t/* Errors from <mach/kern_return.h>. */";
+ lines[lno++] = "\n\t/* Errors from <mach/kern_return.h>. */";
next;
}
@@ -95,13 +97,14 @@ in_mach_errors != "" && $2 == "MACH_IPC_COMPAT" \
in_mach_errors == FILENAME && NF == 3 && $1 == "#define" \
{
- printf "\t%-32s= %s,\n", "E" $2, $3;
+ comma[lno] = 1;
+ lines[lno++] = sprintf("\t%-32s= %s", "E" $2, $3);
}
$1 == "#define" && $2 == "_MACH_MIG_ERRORS_H_" \
{
in_mig_errors = 1;
- print "\n\t/* Errors from <mach/mig_errors.h>. */";
+ lines[lno++] = "\n\t/* Errors from <mach/mig_errors.h>. */";
next;
}
in_mig_errors && $1 == "#endif" && $3 == "_MACH_MIG_ERRORS_H_" \
@@ -112,16 +115,17 @@ in_mig_errors && $1 == "#endif" && $3 == "_MACH_MIG_ERRORS_H_" \
(in_mig_errors && $1 == "#define" && $3 <= -300) || \
(in_device_errors && $1 == "#define") \
{
- printf "%-32s", sprintf ("\t%-24s= %s,", "E" $2, $3);
+ comment = "";
for (i = 4; i <= NF; ++i)
- printf " %s", $i;
- printf "\n";
+ comment = comment " " $i;
+ comma[lno] = 1;
+ lines[lno++] = sprintf("%-32s", sprintf ("\t%-24s= %s", "E" $2, $3)) comment;
}
$1 == "#define" && $2 == "D_SUCCESS" \
{
in_device_errors = 1;
- print "\n\t/* Errors from <device/device_types.h>. */";
+ lines[lno++] = "\n\t/* Errors from <device/device_types.h>. */";
next;
}
in_device_errors && $1 == "#endif" \
@@ -132,6 +136,9 @@ in_device_errors && $1 == "#endif" \
END \
{
+ for (i = 0; i < lno - 1; ++i)
+ printf "%s%s\n", lines[i], (comma[i] ? "," : "");
+ print lines[i];
print "";
print "};";
print "";