Mercurial > hg
comparison setup.py @ 31561:312e62640798
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.
author | Jun Wu <quark@fb.com> |
---|---|
date | Mon, 20 Mar 2017 15:11:18 -0700 |
parents | 5a0460219649 |
children | 3db113eef95f |
comparison
equal
deleted
inserted
replaced
31560:5a0460219649 | 31561:312e62640798 |
---|---|
588 'mercurial/util.h'] | 588 'mercurial/util.h'] |
589 | 589 |
590 osutil_cflags = [] | 590 osutil_cflags = [] |
591 osutil_ldflags = [] | 591 osutil_ldflags = [] |
592 | 592 |
593 # platform specific macros: HAVE_SETPROCTITLE | 593 # platform specific macros |
594 for plat, func in [(re.compile('freebsd'), 'setproctitle')]: | 594 for plat, func in [('bsd', 'setproctitle'), ('bsd|darwin|linux', 'statfs')]: |
595 if plat.search(sys.platform) and hasfunction(new_compiler(), func): | 595 if re.search(plat, sys.platform) and hasfunction(new_compiler(), func): |
596 osutil_cflags.append('-DHAVE_%s' % func.upper()) | 596 osutil_cflags.append('-DHAVE_%s' % func.upper()) |
597 | 597 |
598 if sys.platform == 'darwin': | 598 if sys.platform == 'darwin': |
599 osutil_ldflags += ['-framework', 'ApplicationServices'] | 599 osutil_ldflags += ['-framework', 'ApplicationServices'] |
600 | 600 |