Marc-André Lureau wrote:
> I tested this patch, it works with mingw64 both i686 and x86_64, thanks!
Good, thanks. I'm committing it:
2012-01-29 Bruno Haible
sys_stat: Fix support for mingw64 and MSVC.
* lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
Hi Bruno,
On Mon, Jan 30, 2012 at 1:02 AM, Bruno Haible wrote:
> Thanks. Can you please try this patch?
I tested this patch, it works with mingw64 both i686 and x86_64, thanks!
--
Marc-André Lureau
Marc-André Lureau wrote:
> > What is the problem in the first place? Which warning or error did you
> > get? Please also show snippets from the .h files with relevant information.
>
> stat.c: In function 'rpl_stat':
> stat.c:67:3: warning: passing argument 2 of 'orig_stat' from
> incompatible poin
On Sat, Jan 28, 2012 at 12:49 PM, Bruno Haible wrote:
> If you have to make such a change to lib/tempname.c, the chances are high
> that gnulib users also will have to adapt their programs. Which would be
> against the spirit of gnulib: Packages that use gnulib should use the
> POSIX or glibc API.
Marc-André Lureau wrote:
> --- a/lib/tempname.c
> +++ b/lib/tempname.c
> @@ -61,7 +61,7 @@
> #if _LIBC
> # define struct_stat64 struct stat64
> #else
> -# define struct_stat64 struct stat
> +# define struct_stat64 orig_struct_stat
> # define __gen_tempname gen_tempname
> # define __getpid getp
* lib/sys_stat.in.h: in order to keep mingw64 stat type, add a
orig_strut_stat typedef. A bunch of "struct stat" need to be
replaced to use that original type, because stat() is defined by
rpl_stat() instead.
* lib/canonicalize-lgpl.c (__realpath): use orig_struct_stat.
* lib/readlink.c (readlink)