poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix a compilation error on Solaris


From: Jose E. Marchesi
Subject: Re: Fix a compilation error on Solaris
Date: Sun, 21 Feb 2021 19:11:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> On Solaris 10, I see a compilation error:
>
> gcc -m64 -O2 -DHAVE_CONFIG_H -I. -I../../poke -I../gl -I../../gl
> -I../../common -I../../libpoke -I../libpoke
> -DJITTER_VERSION=\"0.9.251.2-1d28\"
> -DPKGDATADIR=\"/home/haible/prefix-x86_64/share/poke\"
> -DPKGINFODIR=\"/home/haible/prefix-x86_64/share/info\"
> -DLOCALEDIR=\"/home/haible/prefix-x86_64/share/locale\"
> -I/home/haible/prefix-x86_64/include -Wall -D_REENTRANT -Wall
> -I/opt/csw/include/json-c -g -O2 -MT poke-pk-map-tab.o -MD -MP -MF
> .deps/poke-pk-map-tab.Tpo -c -o poke-pk-map-tab.o `test -f
> 'pk-map-tab.c' || echo '../../poke/'`pk-map-tab.c
> In file included from 
> /opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0/include-fixed/stdio.h:75:0,
>                  from ../gl/stdio.h:43,
>                  from ../gl/textstyle.h:38,
>                  from ../../poke/pk-term.h:24,
>                  from pk-map-tab.y:42:
> pk-map-tab.y: In function 'pk_map_parse_file':
> pk-map-tab.y:373:9: error: expected identifier or '(' before '&' token
> *** Error code 1
>
> It is caused by a declaration of a local variable named 'stderr'. On many
> platforms, 'stdin', 'stdout', 'stderr' expand to some array references.

Ooops :)

OK for master.
Thanks!

>
> Here is a proposed fix.
>
>>From 48372af95e6b4a3d302e01467c9f26ba2eaf9ef9 Mon Sep 17 00:00:00 2001
> From: Bruno Haible <bruno@clisp.org>
> Date: Sun, 21 Feb 2021 13:10:15 +0100
> Subject: [PATCH] Fix a compilation error on Solaris.
>
> * poke/pk-map-tab.y (pk_map_parse_file): Remove local variable 'stderr'.
> ---
>  poke/pk-map-tab.y | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/poke/pk-map-tab.y b/poke/pk-map-tab.y
> index aea6b12..6165993 100644
> --- a/poke/pk-map-tab.y
> +++ b/poke/pk-map-tab.y
> @@ -370,7 +370,6 @@ pk_map_parsed_map
>  pk_map_parse_file (const char *filename, FILE *fp)
>  {
>    int ret;
> -  char *stderr;
>    struct pk_map_parser map_parser;
>  
>    map_parser.map = NULL;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]