Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Oct 2019 17:53:15 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: loff_t definition in <fcntl.h> (vs. glibc in
 <sys/types.h>)

On Wed, Oct 16, 2019 at 11:28:38PM +0200, Petr Vorel wrote:
> Hi Rich,
> 
> what is the reason for loff_t being defined in <fcntl.h> ?
> It was defined some time ago, in v0.9.5.
> 
> glibc (and thus uclibc; + also Bionic) has it in <sys/types.h>, defined long
> time before.  Who is correct? I guess loff_t not being posix, therefore it
> shouldn't be in <sys/types.h> ?
> 
> I'm asking because it'd be nice to have it for both in single header
> (portability).

The reason it's defined in fcntl.h is because that's where the
declarations for the only functions which use it in their interfaces
reside. If it needs to be made available from multiple places, that
could be done at some point, but this is a really minor type that
shouldn't be used except with with functions defined in terms of it.

Rich

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.