Print

Print


Pretty easy. Put the header with an "extern" definition to he function which is defined in the corresponding "cc" file. So, here we have (I shortened the names to make them more manageable):

XrdFileCache/posix_fallocate_osx.hh -> XrdSys/XrdSysFallocate.hh
If the have something like this

#ifndef __APPLE__
#include <fcntl.h>
#else 
........ the whole thing sans the function body with the following....
extern int posix_fallocate(int fd, off_t offset, off_t len);
#endif 
----------------
Then place the actual function body in 
XrdSys/XrdSysFallocate.cc

Make sure to if/def it so it only compiles on macOS.

Then in add the header and cc file entry in XrdUtils.cmake in the obvious place.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/827#issuecomment-422957813

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1