Re: NFS_SUPER_MAGIC portability

2016-09-25 Thread Ole Streicher
Christian Seiler writes: > Therefore, it might be a good idea to know _why_ you want to check for > NFS here? What's the use case? Perhaps there's a better and more > portable way to check for that specific thing. That was the key question ;-) Scanning the code showed me that the function is act

Re: NFS_SUPER_MAGIC portability

2016-09-25 Thread Christian Seiler
On 09/25/2016 03:12 PM, Ole Streicher wrote: > I have the problem that in a package (casacore) there is basically the > following code: > > -8< > #include > #include > > Bool Directory::isNFSMounted() const > { >struct stat

Re: NFS_SUPER_MAGIC portability

2016-09-25 Thread Paul Wise
On Sun, Sep 25, 2016 at 9:50 PM, Paul Wise wrote: > A bit of web searching A bit of codesearching finds this interesting function in coreutils: https://sources.debian.net/src/coreutils/8.25-2/src/stat.c#L212 -- bye, pabs https://wiki.debian.org/PaulWise

Re: NFS_SUPER_MAGIC portability

2016-09-25 Thread Paul Wise
On Sun, Sep 25, 2016 at 9:12 PM, Ole Streicher wrote: > The linux include subdir is obviously only available on Linux archs, not > on kfreebsd or hurd. From the "statfs" manpage, I had the impression > that the second include is just not needed; however then NFS_SUPER_MAGIC > is not available. A

NFS_SUPER_MAGIC portability

2016-09-25 Thread Ole Streicher
Hi, I have the problem that in a package (casacore) there is basically the following code: -8< #include #include Bool Directory::isNFSMounted() const { struct statfs buf; if (statfs (itsFile.path().expandedName().chars()