bug-wget
[Top][All Lists]
Advanced

[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: Thu, 17 Dec 2015 20:25:47 +0900 (JST)

Hello, Tim.

Fine.
It is simple and clear resolution if you have no reason to keep #define 
_XOPEN_SOURCE.

On Solaris 10 x11 & solarisstudio12.4,
I confirmed make & make check passes for the followings all:

- with -std=c89
- with -std=c99
- with -std=c11
- without -std=


--- Kiyoshi <address@hidden>



----- Original Message -----
> From: Tim Rühsen <address@hidden>
> To: address@hidden
> Cc: Giuseppe Scrivano <address@hidden>; Kiyoshi KANAZAWA <address@hidden>
> Date: 2015/12/17, Thu 05:01
> Subject: Re: [Bug-wget] flock is not available on solaris 10 (at least sparc)

> Sounds like doing gnulib's job !?
> 
> If flock() is not available, gnulib throws in it's flock() emulation. They 
> already check for flock and fcntl being available. Not sure, what problem 
> exists on Solaris 11 - there should be a working fcntl available.
> 
> Is the gnulib documentation up-to-date ?
> 
> But back to 0... the flock failure has been addressed by adding it to 
> boostrap.conf.
> 
> What Christian and I experience is this (just got it on OpenCSW Solaris 11):
> 
> /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-
> fixed/sys/feature_tests.h:346:2: error: #error "Compiler or options invalid 
> 
> for pre-UNIX 03 X/Open applications       and pre-2001 POSIX applications"
> #error "Compiler or options invalid for pre-UNIX 03 X/Open applications 
> \
>   ^
> In file included from     :12:0,
>                  from ../lib/sys/types.h:28,
>                  from sysdep.h:85,
>                  from wget.h:47,
>                  from ftp-ls.c:32:
> 
> 
> From feature_test.h:
> /*
> * It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
> * using c99.  The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
> * and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
> * or a POSIX.1-2001 application with anything other than a c99 or later
> * compiler.  Therefore, we force an error in both cases.
> */
> #if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && 
> !defined(_XPG6))
> #error "Compiler or options invalid for pre-UNIX 03 X/Open applications 
> \
>         and pre-2001 POSIX applications"
> #elif !defined(_STDC_C99) && \
>         (defined(__XOPEN_OR_POSIX) && defined(_XPG6))
> #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications 
> \
>         require the use of c99"
> #endif
> 
> 
> Seems pretty clear - gcc 5 has C99 as default standard (and Solaris has gcc 
> 5.2).
> But we explicitely define _XOPEN_SOURCE 500 in src/sysdep.h, which says we 
> want 'X/Open 5, POSIX 1995' functions and nothing newer.
> Solaris headers just make some checks to ensure proper definitions here and 
> they fail.
> 
> When I simply remove the define, everything compiles ok.
> The question is if we still want what the comment says: "/* Request the 
> "Unix 
> 98 compilation environment". */". I think, we should allow Wget to be 
> compiled 
> on newer environments as well.
> 
> WDYT ?
> 
> Tim



reply via email to

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