From 02d7dcc535a2c39492bbfb6b49543fd53bebe05d Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sat, 10 Nov 2012 13:16:11 -0500 Subject: Work towards making both PT_PAX and xattr PAX optional X-Gentoo-Bug: 427890 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=427890 X-Gentoo-Bug: 440018 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=440018 --- scripts/paxmodule.c | 16 ++++++++-------- scripts/setup.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c index c3dfc28..9cd1ec3 100644 --- a/scripts/paxmodule.c +++ b/scripts/paxmodule.c @@ -22,7 +22,7 @@ #include -#ifdef XATTR +#ifdef XTPAX #include #endif @@ -31,7 +31,7 @@ #include #include -#ifdef XATTR +#ifdef XTPAX #define PAX_NAMESPACE "user.pax.flags" #endif @@ -177,7 +177,7 @@ string2bin(char *buf) } -#ifdef XATTR +#ifdef XTPAX uint16_t get_xt_flags(int fd) { @@ -236,7 +236,7 @@ pax_getflags(PyObject *self, PyObject *args) return NULL; } -#ifdef XATTR +#ifdef XTPAX flags = get_xt_flags(fd); if( flags != UINT16_MAX ) { @@ -252,7 +252,7 @@ pax_getflags(PyObject *self, PyObject *args) memset(buf, 0, FLAGS_SIZE); bin2string(flags, buf); } -#ifdef XATTR +#ifdef XTPAX } #endif @@ -316,7 +316,7 @@ set_pt_flags(int fd, uint16_t pt_flags) } -#ifdef XATTR +#ifdef XTPAX void set_xt_flags(int fd, uint16_t xt_flags) { @@ -352,7 +352,7 @@ pax_setbinflags(PyObject *self, PyObject *args) set_pt_flags(fd, flags); -#ifdef XATTR +#ifdef XTPAX set_xt_flags(fd, flags); #endif @@ -384,7 +384,7 @@ pax_setstrflags(PyObject *self, PyObject *args) set_pt_flags(fd, flags); -#ifdef XATTR +#ifdef XTPAX set_xt_flags(fd, flags); #endif diff --git a/scripts/setup.py b/scripts/setup.py index 40aecdb..8c78279 100755 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -3,26 +3,26 @@ import os from distutils.core import setup, Extension -xattr = os.getenv('XATTR') +xattr = os.getenv('XTPAX') if xattr != None: module1 = Extension( name='pax', sources = ['paxmodule.c'], libraries = ['elf', 'attr'], - define_macros = [('XATTR', None)] + define_macros = [('XTPAX', None)] ) else: module1 = Extension( name='pax', sources = ['paxmodule.c'], libraries = ['elf'], - undef_macros = ['XATTR'] + undef_macros = ['XTPAX'] ) setup( name = 'PaxPython', - version = '1.0', + version = '2.0', author = 'Anthony G. Basile', author_email = 'blueness@gentoo.org', url = 'http://dev.gentoo.org/~blueness/elfix', -- cgit v1.2.3-65-gdbad