mirror of
https://github.com/facebook/sapling.git
synced 2025-01-01 01:25:49 +03:00
setup: detect statfs
statfs is not defined by POSIX but is available in various systems to help decide filesystem type. Let's detect it and set the macro HAVE_STATFS.
This commit is contained in:
parent
1aec4664c3
commit
416be40974
6
setup.py
6
setup.py
@ -590,9 +590,9 @@ common_depends = ['mercurial/bitmanipulation.h',
|
||||
osutil_cflags = []
|
||||
osutil_ldflags = []
|
||||
|
||||
# platform specific macros: HAVE_SETPROCTITLE
|
||||
for plat, func in [(re.compile('freebsd'), 'setproctitle')]:
|
||||
if plat.search(sys.platform) and hasfunction(new_compiler(), func):
|
||||
# platform specific macros
|
||||
for plat, func in [('bsd', 'setproctitle'), ('bsd|darwin|linux', 'statfs')]:
|
||||
if re.search(plat, sys.platform) and hasfunction(new_compiler(), func):
|
||||
osutil_cflags.append('-DHAVE_%s' % func.upper())
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
|
Loading…
Reference in New Issue
Block a user