[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot build gettext 0.17 on Solaris 2.8
From: |
Bruno Haible |
Subject: |
Re: Cannot build gettext 0.17 on Solaris 2.8 |
Date: |
Wed, 29 Oct 2008 03:18:22 +0100 |
User-agent: |
KMail/1.5.4 |
Hi,
Lamarque Eric wrote:
> I cannot build GNU gettext 0.17 on Solaris 2.8 using Sun Workshop 6.2.
>
> The problem is located in file gettext-0.17/gettext-tools/src/msgmerge.c
> where #pragma directives are used with a space between '#' and 'pragma'.
>
> I attach a patch that solves the problem, if you find this report useful.
Thanks for the report. I guess you got a compiler error? Could you also show
- the options with which you ran the 'configure' command?
- the cc compiler command that leads to the error?
- the resulting error message?
The reason I ask is that
1) spaces between '#' and preprocessor directives are allowed since ANSI C,
that is, 18 years ago, and Sun Workshop 6.2 is "only" 7 years old,
2) for me, the thing appears to work right:
$ cat foo.c
#include <stdio.h>
#if 1
# pragma omp parallel for schedule(dynamic)
#endif
int main ()
{
printf("Hello, world.\n");
return 0;
}
$ uname -sr
SunOS 5.8
$ cc -V 2>&1 | head -1
cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
$ cc foo.c
$ echo $?
0
Oh, with an option for OpenMP, I can reproduce it, finally:
$ cc -xopenmp foo.c
cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
"foo.c", line 3: invalid source character: '#'
"foo.c", line 3: warning: old-style declaration or incorrect type for: pragma
"foo.c", line 3: syntax error before or at: omp
"foo.c", line 3: warning: old-style declaration or incorrect type for: omp
"foo.c", line 3: warning: old-style declaration or incorrect type for: parallel
"foo.c", line 6: parameter not in identifier list: main
"foo.c", line 6: syntax error before or at: {
cc: acomp failed for foo.c
I'm applying your patch. Thank you.
Bruno