maint: refactor SMACK interface to a separate module
commit5fb93f635b935ea5632e36600e07a2c5fc5bad5e
authorPádraig Brady <P@draigBrady.com>
Tue, 2 Jul 2013 02:42:20 +0000 (2 03:42 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 2 Jul 2013 08:47:32 +0000 (2 09:47 +0100)
tree387476cda6992e8768ff4646cc605f24dd307de5
parentb8a87eaf2d6f054473d2dab491ffd4252b6f5b4d
maint: refactor SMACK interface to a separate module

Consolidate all smack routines and checks in a module.
We replace and wrap the most commonly used smack routines,
which allows removing ifdefs throughout the code.

* gl/lib/smack.h: A new header containing the implementation
of the wrapped and replacement routines.  Note the is_smack_enabled()
routine should be optimized out at compile time when compiled
on a system without libsmack.
* gl/modules/smack: Describe the new module and move the
configure time code here from ...
* m4/jm-macros.m4: ... here.
* bootstrap.conf: Reference the new module.
* src/id.c: Use the routines without ifdefs where possible.
* src/ls.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
bootstrap.conf
gl/lib/smack.h [new file with mode: 0644]
gl/modules/smack [new file with mode: 0644]
m4/jm-macros.m4
src/id.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c