summaryrefslogtreecommitdiff
path: root/helpers.c
AgeCommit message (Collapse)Author
2018-03-21Refactor #includes and headersSitsofe Wheeler
- Try and remove unneeded #include lines - Try and add #include lines that would allow the files to be built in a more standalone manner Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2013-05-22helpers: fixup bad fadvise checkJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2013-01-10Add configure scriptJens Axboe
Get rid of all the fragile guessing and checking of features, and roll a configure script instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-11-29Wire up _weak posix_fadvise()Jens Axboe
The commit adding Android support included a botched variant of posix_fadvise(). Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-08-01Fix fallocate erroneously returning ENOSYS on Linux systemsWade Cline
Currently, the helpers.c file provides a function defintion for Linux fallocate that sets errno to ENOSYS and returns failure; this is useful for a non-Linux OS. However, this definition will override the Linux implementation of fallocate when 'fallocate=keep' is set. Adding a preprocessor macro to check if Linux fallocate is defined fixes this issue. Signed-off-by: Wade Cline <wcline@us.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-07-12Fix compile on older systems that don't have fallocate() on LinuxJens Axboe
Commit a596f047 broke build en eg CentOS 5: filesetup.c:17:26: error: linux/falloc.h: No such file or directory filesetup.c: In function 'extend_file': filesetup.c:95: warning: implicit declaration of function 'fallocate' filesetup.c:95: error: 'FALLOC_FL_KEEP_SIZE' undeclared (first use in this function) filesetup.c:95: error: (Each undeclared identifier is reported only once filesetup.c:95: error: for each function it appears in.) make: *** [filesetup.o] Error 1 Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-07-10Take __weak out of the compiler namespaceBruce Cran
With Xcode 4 on OS X shipping LLVM by default, I tried building fio with clang and found that the definition of __weak conflicts with something clang defines. I've attached a patch which replaces the double underscores with a single underscore, removing it from the compiler-dependant namespace. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-09-30Fix compile on RHEL4/SLES10Joss Grossman
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-03-15Check for syscall definitions, before declaring __weak helperJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-03-13Add __weak sync_file_range()Jens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-12-16Include jugglingJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-12-16Make weak posix_memalign() private to SolarisJens Axboe
OSX has posix_memalign() but no memalign() and no malloc.h standard include. So until we have a autoconf based build system, move this weak helper to the private Solaris header. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-12-15Fix some issues with the OSX portJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-12-14Support for Mac OS 10.6.2Jens Axboe
Contributed by Small Tree, adopted to newer fio version by me. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-24Add helpers include fileJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-24Fix compile error due to missing ENOMEM on some platformsJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-23Fix posix_memalign() return value in case of errorJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-23Add posix_* weak helpersJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>