[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Getting File Descriptor in C API
- From: Cathal Garvey <cathalgarvey@...>
- Date: Tue, 26 Nov 2013 00:31:28 +0000
Thanks to Craig for the help: I've added the fruits of this fumbling to
a fork of luaposix, found here:
https://github.com/cathalgarvey/luaposix
If you can build and install that, you'll have a new function:
posix.fadvise. Plus, the 6 constants defined for use with same:
POSIX_FADV_XXXX.
Have made pull request, hope to see it in mainline.
Thanks to the devs of lua for making a language that's easily
extendable, so a newcomer to lua can write a new module before he's
written the use-case! :)
On Mon, 25 Nov 2013 20:51:40 +0000
"Cathal Garvey (Phone)" <cathalgarvey@cathalgarvey.me> wrote:
> Thank you craig, that solved it! :)
> (Well, that and not shadowing the function by accidentally naming an
> int "fileno"..)
>
> Craig Barnes <craigbarnes85@gmail.com> wrote:
> >> Now, I have a new problem which is all C: fileno won't load from
> >stdio.h,
> >> even if I #define __USE_POSIX as the file appears to suggest..
> >>
> >> I don't expect answers to my new problem as it's not Lua specific
> >> but
> >would
> >> still be grateful! :)
> >
> >Try this:
> >
> > #define _POSIX_C_SOURCE 1
>
Attachment:
signature.asc
Description: PGP signature