Warning building lfs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning building lfs

Thijs Schreijer

I don’t think I’ve seen this before, but today I got a warning when reinstalling LFS using LuaRocks. Did something change here?

 

luarocks install luafilesystem

 

Installing https://luarocks.org/luafilesystem-1.6.3-1.src.rock...

Using https://luarocks.org/luafilesystem-1.6.3-1.src.rock... switching to 'build' mode

mingw32-gcc -O2 -c -o src/lfs.o -IC:/Program Files (x86)/Lua/5.1/include/lua/5.1 src/lfs.c

In file included from src/lfs.c:67:0:

src/lfs.h:21:0: warning: "fileno" redefined [enabled by default]

#define fileno(f) (_fileno(f))

^

In file included from src/lfs.c:38:0:

c:\mingw\include\stdio.h:516:0: note: this is the location of the previous definition

#define fileno(__F) ((__F)->_file)

^

mingw32-gcc -shared -o lfs.dll src/lfs.o C:/Program Files (x86)/Lua/5.1/bin/lua51.dll -lm

Updating manifest for C:\Program Files (x86)\LuaRocks\systree/lib/luarocks/rocks

luafilesystem 1.6.3-1 is now built and installed in C:\Program Files (x86)\LuaRocks\systree (license: MIT/X11)

 

 

Thijs

Reply | Threaded
Open this post in threaded view
|

Re: Warning building lfs

Ignacio Burgueño-2
Since version 1.6.3, luafilesystem assumes that no compiler on Windows provides "fileno" (among others). But your version of mingw is providing that, hence the warning.


Reply | Threaded
Open this post in threaded view
|

Re: Warning building lfs

Philipp Janda
In reply to this post by Thijs Schreijer
Am 24.08.2015 um 09:05 schröbte Thijs Schreijer:
> I don't think I've seen this before, but today I got a warning when reinstalling LFS using LuaRocks. Did something change here?

Yes, the define for `fileno` was added in January in commit e798c4[1],
and probably only tested with Visual C (which doesn't provide a `fileno`
macro any more) and not MinGW (which does).

>
> luarocks install luafilesystem
>
> Installing https://luarocks.org/luafilesystem-1.6.3-1.src.rock...
> Using https://luarocks.org/luafilesystem-1.6.3-1.src.rock... switching to 'build' mode
> mingw32-gcc -O2 -c -o src/lfs.o -IC:/Program Files (x86)/Lua/5.1/include/lua/5.1 src/lfs.c
> In file included from src/lfs.c:67:0:
> src/lfs.h:21:0: warning: "fileno" redefined [enabled by default]
> #define fileno(f) (_fileno(f))
> ^
> In file included from src/lfs.c:38:0:
> c:\mingw\include\stdio.h:516:0: note: this is the location of the previous definition
> #define fileno(__F) ((__F)->_file)
> ^
> mingw32-gcc -shared -o lfs.dll src/lfs.o C:/Program Files (x86)/Lua/5.1/bin/lua51.dll -lm
> Updating manifest for C:\Program Files (x86)\LuaRocks\systree/lib/luarocks/rocks
> luafilesystem 1.6.3-1 is now built and installed in C:\Program Files (x86)\LuaRocks\systree (license: MIT/X11)
>
>
> Thijs
>


Philipp

   [1]:
https://github.com/keplerproject/luafilesystem/commit/e798c4f07f2c355256076ebcc5ff779a8548c806



Reply | Threaded
Open this post in threaded view
|

RE: Warning building lfs

Thijs Schreijer
In reply to this post by Ignacio Burgueño-2

Thanks, just send a PR with a fix[1]

 

Thijs

 

[1] https://github.com/keplerproject/luafilesystem/pull/53

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Ignacio Burgueño
Sent: maandag 24 augustus 2015 16:54
To: Lua mailing list
Subject: Re: Warning building lfs

 

Since version 1.6.3, luafilesystem assumes that no compiler on Windows provides "fileno" (among others). But your version of mingw is providing that, hence the warning.