Re: [PATCH] Fix errno declarations



On Thu, 2006-04-06 at 22:55 +0200, Julio M. Merino Vidal wrote:
> Hi,
> 
> The libgnomevfs/xdgmimemagic.c and modules/fstype.c files in gnome-vfs include
> errno.h to get the declaration of the errno variable.  This is correct.
> 
> However, they also hardcode an extern declaration, 'extern int errno', which is
> against the ISO C standard and makes the build of those files break, at least,
> under Dragonfly BSD (because that line conflicts with the one in errno.h).
> (ISO C90 said that errno is a macro while C99 says that it is an lvalue.)
> 
> The solution is trivial: get rid of the extern int errno lines from the code.
> Note that this does not introduce regressions because many other source files
> in gnome-vfs are already using the errno variable based solely on the errno.h
> header.
> 
> See the attached patch.

Looks good, I'm commiting this. Thanks.

The xdgmime part should also be applied to the xdgmime upstream cvs.
CC:ing Matthias Clasen for that.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a time-tossed hunchbacked master criminal on the hunt for the last 
specimen of a great and near-mythical creature. She's a strong-willed junkie 
safe cracker from the wrong side of the tracks. They fight crime! 




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