This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] build_wcs_upper_buffer definition
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: chris dot steel dot lnx at googlemail dot com
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 27 Nov 2008 17:14:21 -0500
- Subject: Re: [PATCH] build_wcs_upper_buffer definition
- References: <cb31d0c70811271307u61aac6c4md4a79103077c1188@mail.gmail.com>
On Thu, Nov 27, 2008 at 4:07 PM, Chris Steel
<chris.steel.lnx@googlemail.com> wrote:
> I think I've found a small coding error in glibc which breaks my build.
>
> build_wcs_upper_buffer is defined in posix/regex_internal.h to have a
> return type of int, but it's used in posix/regex_internal.c and
> posix/regexec.c with a return type of reg_errcode_t. This patch fixes
> the problem:
Thanks!
> 2008-11-26 Chris Steel <chris.steel.lnx@googlemail.com>
>
You should have one tab before the start of each line.
> * posix/regex_internal.h (build_wcs_upper_buffer): Change
> return type from int to reg_errcode_t to match usage in
> posix/regex_internal.c and posix/regex.c
This should be as canonical and succint as possible.
e.g. "Return type is reg_error_t."
> diff -urN glibc-2.9-20081124-clean/posix/regex_internal.h
> glibc-2.9-20081124/posix/regex_internal.h
> --- glibc-2.9-20081124-clean/posix/regex_internal.h 2007-08-26
> 02:35:05.000000000 +0100
> +++ glibc-2.9-20081124/posix/regex_internal.h 2008-11-25
> 11:43:12.482102615 +0000
> @@ -391,7 +391,7 @@
> internal_function;
> # ifdef RE_ENABLE_I18N
> static void build_wcs_buffer (re_string_t *pstr) internal_function;
> -static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
> +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
> internal_function;
> # endif /* RE_ENABLE_I18N */
> static void build_upper_buffer (re_string_t *pstr) internal_function;
> static void re_string_translate_buffer (re_string_t *pstr) internal_function;
This patch is wrapped and therefore corrupted. Please use a mailer
that doesn't wrap, or attach the patch.
> No regressions on x86_64-linux-gnu. Fixes build failure for
> arm-iwmmxt-linux-gnueabi
Please resend with those changes.
Cheers,
Carlos.