[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patches against sh-utils 2.0.11
From: |
H. Peter Anvin |
Subject: |
Patches against sh-utils 2.0.11 |
Date: |
Thu, 19 Jul 2001 12:15:25 -0700 |
Hi everyone,
Here are two small patches against sh-utils 2.0.11. They do:
a) Enable compiling with gcc 2.91.66/glibc 2.1.3 (RedHat Linux 6.1); this
is the __restrict_arr patch.
b) The following small changes for "date -R":
i) Remove space-padding the date field, per the recommendation in RFC
2822, section 3.3. Other than that, "date -R" should already be RFC 2822
compliant without using "obsolete" features.
ii) Change LC_TIME instead of LC_ALL. LC_ALL is overkill, and would
have unwanted side effects if there is an error message.
I was considering adding --rfc-2822 as an option (alias for --rfc-822),
but it would have the unwanted result that --rfc would now be ambiguous.
-hpa
diff -ur orig/sh-utils-2.0.11/lib/regex.h sh-utils-2.0.11/lib/regex.h
--- orig/sh-utils-2.0.11/lib/regex.h Sun Oct 29 05:13:04 2000
+++ sh-utils-2.0.11/lib/regex.h Thu Jul 19 11:57:49 2001
@@ -523,9 +523,12 @@
# define __restrict
# endif
# endif
+#endif
+
/* For now unconditionally define __restrict_arr to expand to nothing.
Ideally we would have a test for the compiler which allows defining
it to restrict. */
+#ifndef __restrict_arr
# define __restrict_arr
#endif
--- orig/sh-utils-2.0.11/src/date.c Thu Oct 26 01:32:40 2000
+++ sh-utils-2.0.11/src/date.c Thu Jul 19 11:52:09 2001
@@ -76,7 +76,7 @@
/* If nonzero, display an ISO 8601 format date/time string */
static int iso_8601_format = 0;
-/* If non-zero, display time in RFC-822 format for mail or news. */
+/* If non-zero, display time in RFC-(2)822 format for mail or news. */
static int rfc_format = 0;
static struct option const long_options[] =
@@ -455,7 +455,7 @@
RFC time format outside the continental United States and GMT. */
if (rfc_format)
- format = "%a, %_d %b %Y %H:%M:%S %z";
+ format = "%a, %d %b %Y %H:%M:%S %z";
else if (iso_8601_format)
format = iso_format_string[iso_8601_format - 1];
else
@@ -471,7 +471,7 @@
}
if (rfc_format)
- setlocale (LC_ALL, "C");
+ setlocale (LC_TIME, "C");
do
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patches against sh-utils 2.0.11,
H. Peter Anvin <=