[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fcntl for mingw
From: |
Eric Blake |
Subject: |
Re: fcntl for mingw |
Date: |
Mon, 14 Dec 2009 22:16:26 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 12/11/2009 8:38 AM:
>> + switch (action)
>> + {
>> + case F_DUPFD_CLOEXEC:
>> + {
>> + int target = va_arg (arg, int);
>
> Is the arg of type 'int' or 'long'? POSIX says it's an 'int'. But
> the Linux man page
> <http://www.kernel.org/doc/man-pages/online/pages/man2/fcntl.2.html>
> says it's 'long' "in most cases", and indeed glibc's fcntl.c implementation
> uses a 'void *', that is, the same as a 'long'.
That's (hopefully) a bug in the Linux man page. The return type is int,
and since the arg is an fd and the return type an fd, they had better be
the same type. But all the same, I'm cc'ing the man page maintainer.
>
> It makes a difference on big-endian 64-bit platforms (SPARC64, PPC64),
No one writes fcntl(fd,F_DUPFD,1L), since that is contrary to POSIX; and
if fcntl(fd,F_DUPFD,1) doesn't work, then that is a bug in the kernel.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksnG6oACgkQ84KuGfSFAYB5XwCbBQlPvrRFn/z1/NXXYl6gf52Y
KukAn2DGKBcBEkojl7R3gZZ7uLB0kNao
=AEwR
-----END PGP SIGNATURE-----
- fcntl for mingw, Eric Blake, 2009/12/10
- Re: fcntl for mingw, Bruno Haible, 2009/12/11
- Re: GL_LINK_WARNING (was: fcntl for mingw), Bruno Haible, 2009/12/15
- Re: GL_LINK_WARNING, Eric Blake, 2009/12/15
- Re: GL_LINK_WARNING (was: fcntl for mingw), Eric Blake, 2009/12/16
- Re: GL_LINK_WARNING, Eric Blake, 2009/12/16
- Re: GL_LINK_WARNING, Bruno Haible, 2009/12/16