1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00

platform: bump API version (and check consistency)

This commit is contained in:
Marian Beermann 2016-10-02 10:54:30 +02:00
parent 7930d055ec
commit 2bd8ac7762
6 changed files with 13 additions and 8 deletions

View file

@ -94,7 +94,7 @@ def check_extension_modules():
raise ExtensionModuleError
if crypto.API_VERSION != 3:
raise ExtensionModuleError
if platform.API_VERSION != 3:
if platform.API_VERSION != platform.OS_API_VERSION != 4:
raise ExtensionModuleError

View file

@ -12,14 +12,19 @@
from .base import swidth, API_VERSION
from .posix import process_alive, get_process_id, local_pid_alive
OS_API_VERSION = API_VERSION
if sys.platform.startswith('linux'): # pragma: linux only
from .linux import API_VERSION as OS_API_VERSION
from .linux import acl_get, acl_set
from .linux import set_flags, get_flags
from .linux import SyncFile
from .linux import swidth, API_VERSION
from .linux import swidth
elif sys.platform.startswith('freebsd'): # pragma: freebsd only
from .freebsd import API_VERSION as OS_API_VERSION
from .freebsd import acl_get, acl_set
from .freebsd import swidth, API_VERSION
from .freebsd import swidth
elif sys.platform == 'darwin': # pragma: darwin only
from .darwin import API_VERSION as OS_API_VERSION
from .darwin import acl_get, acl_set
from .darwin import swidth, API_VERSION
from .darwin import swidth

View file

@ -13,7 +13,7 @@
are correctly composed into the base functionality.
"""
API_VERSION = 3
API_VERSION = 4
fdatasync = getattr(os, 'fdatasync', os.fsync)

View file

@ -4,7 +4,7 @@ from ..helpers import user2uid, group2gid
from ..helpers import safe_decode, safe_encode
from .posix import swidth
API_VERSION = 3
API_VERSION = 4
cdef extern from "sys/acl.h":
ctypedef struct _acl_t:

View file

@ -4,7 +4,7 @@ from ..helpers import posix_acl_use_stored_uid_gid
from ..helpers import safe_encode, safe_decode
from .posix import swidth
API_VERSION = 3
API_VERSION = 4
cdef extern from "errno.h":
int errno

View file

@ -12,7 +12,7 @@ from .posix import swidth
from libc cimport errno
from libc.stdint cimport int64_t
API_VERSION = 3
API_VERSION = 4
cdef extern from "sys/types.h":
int ACL_TYPE_ACCESS