On Wednesday 16 December 2015 10:31:33 Giuseppe Scrivano wrote: > Tim Ruehsen <[email protected]> writes: > > 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... > > the gnulib documentation for flock says: > > Portability problems not fixed by Gnulib: > > This function is missing on some platforms: > AIX 5.1, HP-UX 11.23, Solaris 11 2011-11, BeOS. > > This can either be because nobody cared before, or because there is no > way to emulate it on these platforms. > > Couldn't we replace the flock part with a write to a tmp file+atomic > rename? In the remote case of two wget processes trying to write the > same file, at least we won't get garbage there. What do you think?
There is no atomic rename for all OSes, AFAIK. How about using fcntl() for locking ? The gnulib emulation might be better and it is a POSIX function. Tim
signature.asc
Description: This is a digitally signed message part.
