[Bug 273711] off64_t abuse in <stdio.h> for native API

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273711

            Bug ID: 273711
           Summary: off64_t abuse in <stdio.h> for native API
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: standards
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When upstreaming BSD support I'd like to disable off64_t for compatibility with
DragonFly, NetBSD, OpenBSD. Unfortunately, this no longer works:

  $ cat a.c
  #include <stdio.h>
  int main() {}

  $ cc -D_OFF64_T_DECLARED a.c
  In file included from a.c:1:
  /usr/include/stdio.h:420:44: error: unknown type name 'off64_t'
  typedef int cookie_seek_function_t(void *, off64_t *, int);
                                             ^
  1 error generated.

base 6710d21d9f7fc added off64_t alias to improve portability without
supporting the whole LFS64 API i.e., stat64, fseek64, etc. are still missing.
However, base 9183be81a7999 introduced dependency on off64_t for
fopencookie(3). musl (Alpine, Chimera, KISS, Void, etc.) also supports[1]
fopencookie(3) and like BSDs has 64-bit off_t[2] but LFS64 API isn't exposed by
default[3].

[1] https://git.musl-libc.org/cgit/musl/commit/?id=061843340fbf
[2] https://git.musl-libc.org/cgit/musl/commit/?id=2dd8d5e1b8ba
[3] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.