summaryrefslogtreecommitdiff
path: root/src/fcstat.c
Commit message (Collapse)AuthorAgeFilesLines
* fcstat: add support for wasm-emscriptenMehdi Sabwat2021-07-061-1/+1
| | | | fallback to f_type statfs struct field, since f_fstypename is not supported on the platform.
* Guard dirent.h includesTim-Philipp Müller2020-07-271-0/+2
| | | | Might not be available on Windows.
* Fix memory leakAkira TAGOH2018-07-191-0/+9
|
* Fix the build issue on GNU/HurdAkira TAGOH2017-03-011-1/+11
| | | | | | | | | PATH_MAX isn't defined on GNU/Hurd. according to the porting guidelines (https://www.gnu.org/software/hurd/hurd/porting/guidelines.html) allocate a memory dynamically instead of relying on the length of a string with PATH_MAX. https://bugs.freedesktop.org/show_bug.cgi?id=97512
* Fix the array allocationAkira TAGOH2015-03-031-1/+1
|
* Rework again to copy the struct direntAkira TAGOH2015-02-271-7/+2
| | | | | | | | | | Assuming that d_name is the last member of struct dirent. In POSIX, the maximum length of d_name is defined as NAME_MAX or FILENAME_MAX though, that assumption may be wrong on some platforms where defines d_name as the flexible array member and allocate the minimum memory to store d_name. Patch from Raimund Steger
* Copy the real size of struct direntAkira TAGOH2015-02-261-2/+9
| | | | | In some platforms, d_name is defined as the flexible array member. We may need to compute the real size for that case.
* filter can be nullAkira TAGOH2015-02-251-1/+1
|
* Fix a build fail on some non-POSIX platformsAkira TAGOH2015-02-231-8/+72
| | | | | Use own scandir function. according to this change, we don't need -Werror things in configure anymore.
* Export recently added APIBehdad Esfahbod2014-07-261-0/+4
| | | | We should remove this alias mess.
* Fallback to lstat() in case the filesystem doesn't support d_type in struct ↵Akira TAGOH2014-03-051-7/+5
| | | | dirent
* Add missing #include <sys/statvfs.h> in fcstat.cAkira TAGOH2014-02-061-0/+3
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=74602
* avoid reading config.h twiceAkira TAGOH2013-09-261-3/+0
| | | | | | | config.h is read from fcint.h now so having a line of the sort of #include "config.h" is duplicate. Bug 69833 - Incorrect SIZEOF_VOID_P and ALIGNOF_DOUBLE definitions causes nasty warnings on MacOSX when building fat libraries
* Fix a incompatible pointer warning on NetBSDAkira TAGOH2013-06-271-0/+10
|
* Bug 47705 - Using O_CLOEXECAkira TAGOH2013-01-081-1/+1
|
* Fix build and warnings on win32Behdad Esfahbod2013-01-021-3/+0
|
* Fix warningBehdad Esfahbod2012-12-291-2/+4
|
* clean upAkira TAGOH2012-12-111-1/+4
| | | | ret won't be -1 if HAVE_STRUCT_DIRENT_D_TYPE isn't defined.
* Fix a build fail on MINGWAkira TAGOH2012-06-131-6/+10
|
* Fix a typo and polish the previous changeAkira TAGOH2012-05-311-13/+8
|
* Fix the build fail on SolarisAkira TAGOH2012-05-301-8/+53
| | | | | | It's introduced by 0ac6c98294d666762960824d39329459b22b48b7. Use lstat() and S_ISDIR() to check if it's the directory or not if there are no d_type in struct dirent.
* Fix cache aging for fonts on FAT filesystem under LinuxMikhail Gusarov2012-05-281-0/+84
| | | | | | | | | | | | | | | | | | Windows does not update mtime of directory on FAT filesystem when file is added to it or removed from it. Fontconfig uses mtime of directory to check cache file aging and hence fails to detect newly added or recently removed files. This changeset detects FAT filesystem (currently implemented for Linux) and adds generating checksum of directory entries instead of using mtime which guarantees proper cache rebuild. For non-FAT filesystems this patch adds single syscall per directory which is negligeable overhead. This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=25535 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
* Move statfs/statvfs wrapper to fcstat.c and add a test for the mtime broken fsAkira TAGOH2012-05-281-0/+108
| | | | just rework to share the efforts between FcIsFsMmapSafe() and FcIsFsMtimeBroken().
* Move FcStat to separate compilation unitMikhail Gusarov2012-05-281-0/+116
FcStat() logic is quite complicated in presence of various semi-broken operating systems and filesystems, split it out in order to make it a bit easier. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>