[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] flock is not available on solaris 10 (at least sparc)
From: |
Kiyoshi KANAZAWA |
Subject: |
Re: [Bug-wget] flock is not available on solaris 10 (at least sparc) |
Date: |
Wed, 16 Dec 2015 08:32:46 +0900 (JST) |
Hello, Tim.
std=c89 is not needed on my environment:
Solaris 10 x86 & (solarisstudio12.4 & gcc-4.8.5).
I can make wget wget-1.17.1 without it.
This is only for hint, why Christian needs -std=c89.
Default of solarisstudio12.4 cc is c11.
But, if I use -std=c11 or -std=c99 explicitly, make stops with
#error: "Compiler or options invalid for pre-UNIX 03 X/Open applications
and pre-2001 POSIX applications"
-std=c89 seems to be set automatically, some where I can not find,
when building wget-1.17.1.
Man page of solarisstudio12.4 says as bellow.
It is very simple comparing to gcc's.
=== from here, Man page ===
-ansi
Equivalent to -std=c89.
-std=value
C language standard selection flag.
value is defined as one of the following:
c89 C source language accepted is that defined
by the ISO C90 standard.
c99 C source language accepted is that defined
by the ISO C99 standard.
c11 C source language accepted is that defined
by the ISO C11 standard.
The first default is c11, implying acceptance of the C
source language as defined by ANSI C11 with extensions.
There is no second default. Instead, specification of
-std without a value will generate an error.
When any of the flags -Xc, -Xa, -Xt, or -xtransition are
specified, the -std first default is not in effect and
the compiler defaults to -xc99=all,no_lib. When -Xs is
specified, the first default is not in effect and the
compiler defaults to -xc99=none. When -xc99 is speci-
fied, the -std first default is not in effect and the
compiler is as specified by -xc99.
The -Xc, -Xa, -Xt, -Xs, and -xc99 flags cannot be used
if the -std flag has been specified. Doing so will
result in an error being issued by the compiler.
=== to here, Man page ===
Regards,
--- Kiyoshi <address@hidden>
----- Original Message -----
> From: Tim Ruehsen <address@hidden>
> To: address@hidden; Kiyoshi KANAZAWA <address@hidden>
> Cc:
> Date: 2015/12/16, Wed 00:39
> Subject: Re: [Bug-wget] flock is not available on solaris 10 (at least sparc)
>
> On Tuesday 15 December 2015 21:55:53 Kiyoshi KANAZAWA wrote:
>> 2. about #error "Compiler or options invalid for pre-UNIX 03 X/Open
>> applications" This error may depends on compilers.
>> Both of "solarisstudio12.4" & "gcc-4.8.5" can
> build wget-1.17.1 without
>> errors.
>>
>> But I once experienced the similar problem when trying to compile
>> "sam2p-0.49.2". At that time, gcc-4.4.7 passed, but gcc-4.8.*
> stopped with
>> this error and I had to set "-D_XPG6" as optional cc flags.
>>
>> ./configure of wget checks compiler to accept ISO C89, such as
>> "checking for gcc -O3 option to accept ISO C89... none needed".
>> If "-std=c89" is required for some versions of gcc, shouldn't
> it set in
>> configure ?
>
> You could try to insert AC_PROG_CC_C89 after AC_PROG_CC. AFAIK, it will add -
> std=c89 but only if needed (if the compiler does not support C89 without it).
>
> autoreconf && ./configure && make clean && make
> to see if the problem still occurs.
>
> Setting CFLAGS directly in configure.ac is not recommended, AFAIK. Maybe just
> a set of compilers understands -std=c89 !? Also, setting -std=c89 might be
> helpful or not, depending of the compiler and version. Nobody is going to
> waste time working on such a list/table.
>
> Maybe we should ask the gnulib people, why flock() isn't emulated on Solaris
>
> when -std=c89 is missing !? I could simply be a bug...
>
> Also, we could replace flock() by some fcntl() code. But then, that is what
> gnulib should do for us.
>
> Tim
>
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), (continued)
Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Kiyoshi KANAZAWA, 2015/12/15
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Tim Ruehsen, 2015/12/15
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc),
Kiyoshi KANAZAWA <=
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Giuseppe Scrivano, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Tim Ruehsen, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Dagobert Michelsen, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Giuseppe Scrivano, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Tim Rühsen, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Dagobert Michelsen, 2015/12/16
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Giuseppe Scrivano, 2015/12/17
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Tim Ruehsen, 2015/12/17
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Kiyoshi KANAZAWA, 2015/12/17
- Re: [Bug-wget] flock is not available on solaris 10 (at least sparc), Tim Ruehsen, 2015/12/17