On Mon, May 22, 2006 at 03:27:06AM +0900, Tanaka Akira wrote: > Package: manpages-dev > Version: 2.22-1 > > fcntl(2) describes that the third argument "arg" is long for F_SETFL. > > % man fcntl > ... > int fcntl(int fd, int cmd, long arg); > ... > F_SETFL > Set the file status flags to the value specified by arg. File > access mode (O_RDONLY, O_WRONLY, O_RDWR) and file creation flags > (e.g.,O_CREAT, O_EXCL, O_TRUNC) in arg are ignored. On Linux > this command can only change the O_APPEND, O_ASYNC, O_DIRECT, > O_NOATIME, and O_NONBLOCK flags. > ... > > But POSIX (IEEE Std 1003.1-2001) defines it int. > > ... > F_SETFL > Set the file status flags, defined in <fcntl.h>, for the file > description associated with fildes from the corresponding bits in the > third argument, arg, taken as type int. Bits corresponding to the file > access mode and the file creation flags, as defined in <fcntl.h>, that > are set in arg shall be ignored. If any bits in arg other than those > mentioned here are changed by the application, the result is > unspecified. > ... Is there a practical difference between "long" and "int"? glibc-doc says something to the effect of "they are the same on most systems" ("c language facilities" section).
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]