in reply to macOS Fcntl.pm missing F_NOCACHE
The Fcntl module only provides access to the list of defines it knows about. The best I can suggest is either to use the raw numeric value with a comment, or put it in a constant sub:
# OSX-specific define: don't cache this file sub F_NOCACHE () { 48 }
If you need greater portability, you could wrap it in some XS exactly as Fcntl does, or create something more generic using h2xs (ships with perl) or Alien::SWIG4 to export everything you find in fcntl.h.
That said, the Fcntl documentation has claimed since docs were originally added in 1995 that "this uses the h2xs program", which does not appear to have been true even then. So you could also consider filing a bug report that Fcntl should do what its docs claim, and make available all constants defined in that header - or just add F_NOCACHE.
Update: removed spurious '$' from prototype; thanks kcott.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: macOS Fcntl.pm missing F_NOCACHE
by kcott (Archbishop) on Oct 10, 2022 at 02:35 UTC | |
by hv (Prior) on Oct 10, 2022 at 13:07 UTC | |
|
Re^2: macOS Fcntl.pm missing F_NOCACHE
by Anonymous Monk on Oct 10, 2022 at 14:21 UTC |