All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <ebb9-PGZyUNKar/Q@public.gmane.org>
To: Bruno Haible <bruno-nWNVUoHt2MvYtjvyW6yDsg@public.gmane.org>
Cc: bug-gnulib-mXXj517/zsQ@public.gmane.org,
	mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: fcntl for mingw
Date: Mon, 14 Dec 2009 22:16:26 -0700	[thread overview]
Message-ID: <4B271BAA.2060802@byu.net> (raw)
In-Reply-To: <200912111638.17976.bruno-nWNVUoHt2MvYtjvyW6yDsg@public.gmane.org>

-----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             ebb9-PGZyUNKar/Q@public.gmane.org
-----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-----
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2009-12-15  5:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <loom.20091211T001536-796@post.gmane.org>
     [not found] ` <200912111638.17976.bruno@clisp.org>
     [not found]   ` <200912111638.17976.bruno-nWNVUoHt2MvYtjvyW6yDsg@public.gmane.org>
2009-12-15  5:16     ` Eric Blake [this message]
     [not found]       ` <4B271BAA.2060802-PGZyUNKar/Q@public.gmane.org>
2012-03-24  3:49         ` fcntl for mingw Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B271BAA.2060802@byu.net \
    --to=ebb9-pgzyunkar/q@public.gmane.org \
    --cc=bruno-nWNVUoHt2MvYtjvyW6yDsg@public.gmane.org \
    --cc=bug-gnulib-mXXj517/zsQ@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.