This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [hurd,commited 1/3] hurd: Fix building libio/tst-memstream3.c


On Mon, 29 Jan 2018, Samuel Thibault wrote:

> Joseph Myers, on lun. 29 janv. 2018 16:33:40 +0000, wrote:
> > and instead remove the FREAD and FWRITE macros from the generic and Hurd 
> > bits/fcntl.h.
> 
> What do we do of sysdeps/unix/bsd/tcflush.c's use of FREAD and FWRITE
> then?

I would have said change it to use O_RDONLY and O_WRONLY of which FREAD 
and FWRITE are aliases, but in the generic header they aren't aliases.

The comments in both bits/fcntl.h headers, referring to those names as 
being for bits returned by F_GETFL, are clearly wrong - F_GETFL returns 
the O_* bits, not some possibly rewritten bits.  So maybe those macros 
should stay, but with the comments in both places changed to say they are 
flags for TIOCFLUSH (e.g. FreeBSD's fcntl.h has a comment referring to 
TIOCFLUSH above the definition of those macros).  And then use a name such 
as FWRITE_FUNC in the tests, since they still shouldn't be using 
implementation-namespace _FWRITE.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]