gpfswrap: Move gpfswrap to lib/util
authorChristof Schmitt <cs@samba.org>
Thu, 19 Feb 2015 23:02:11 +0000 (16:02 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 23 Mar 2015 20:22:12 +0000 (21:22 +0100)
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
lib/util/gpfswrap.c [moved from source3/modules/gpfswrap.c with 100% similarity]
lib/util/gpfswrap.h [moved from source3/modules/gpfswrap.h with 100% similarity]
lib/util/wscript_build
lib/util/wscript_configure
source3/modules/vfs_gpfs.c
source3/modules/wscript_build
source3/wscript

index 182f80af35e6ba1e126bd3deb3d2483aee74f2ba..50d53ed63f1f406274bc75a04fa77e32cf8b658e 100755 (executable)
@@ -28,9 +28,19 @@ bld.SAMBA_SUBSYSTEM('close-low-fd',
                     deps='replace',
                     local_include=False)
 
+samba_debug_add_deps = ''
+
+if bld.CONFIG_SET('HAVE_GPFS'):
+    bld.SAMBA_SUBSYSTEM('gpfswrap',
+                        source='gpfswrap.c',
+                        deps='replace',
+                        local_include=False,
+                        includes=bld.CONFIG_GET('CPPPATH_GPFS'))
+    samba_debug_add_deps += ' gpfswrap'
+
 bld.SAMBA_LIBRARY('samba-debug',
                   source='debug.c',
-                  deps='replace time-basic close-low-fd talloc socket-blocking',
+                  deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps,
                   public_deps='systemd-journal lttng-ust',
                   local_include=False,
                   private_library=True)
index 84c3414334b06b98810dd64bf8e95ab6eb14b0a1..ddd488241213b7449b986e077aba805a0f174c59 100644 (file)
@@ -141,3 +141,7 @@ if (conf.CONFIG_SET('HAVE_LTTNG_TRACEF_H') and
 else:
     conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY')
     conf.undefine('HAVE_LTTNG_TRACEF')
+
+conf.env['CPPPATH_GPFS'] = '/usr/lpp/mmfs/include/'
+if conf.CHECK_HEADERS('gpfs_fcntl.h', False, False, "gpfs"):
+    conf.DEFINE('HAVE_GPFS', '1')
index 999e83b16a01dbf8ccfd330e684f166afae71343..8d9d897702cb136140aad71cb4791545aba0f600 100644 (file)
@@ -30,7 +30,7 @@
 #include "system/filesys.h"
 #include "auth.h"
 #include "lib/util/tevent_unix.h"
-#include "gpfswrap.h"
+#include "lib/util/gpfswrap.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
index a4afcd7ed09c95654beeb79a23806db41c55d994..018cbe9137841b43506f68233e7241e76c5bf13a 100644 (file)
@@ -275,8 +275,8 @@ bld.SAMBA3_MODULE('vfs_commit',
 
 bld.SAMBA3_MODULE('vfs_gpfs',
                  subsystem='vfs',
-                 source='vfs_gpfs.c gpfswrap.c',
-                 deps='NFS4_ACLS non_posix_acls',
+                 source='vfs_gpfs.c',
+                 deps='NFS4_ACLS non_posix_acls gpfswrap',
                  init_function='',
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs'),
                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs'),
index ffff44df1aa4eed1229bdddf29d43f5f8f0ebfca..818cdad817dff8dc4bb60d4a222be675d3d7c3fb 100644 (file)
@@ -1506,10 +1506,6 @@ main() {
             Logs.warn("pthreadpool support cannot be enabled when pthread support was not found")
             conf.undefine('WITH_PTHREADPOOL')
 
-    conf.env['CPPPATH_GPFS'] = '/usr/lpp/mmfs/include/'
-    if conf.CHECK_HEADERS('gpfs_fcntl.h', False, False, "gpfs"):
-        conf.DEFINE('HAVE_GPFS', '1')
-
     if (conf.CHECK_HEADERS('linux/ioctl.h sys/ioctl.h linux/fs.h') and
        conf.CHECK_DECLS('FS_IOC_GETFLAGS FS_COMPR_FL', headers='linux/fs.h')):
            conf.DEFINE('HAVE_LINUX_IOCTL', '1')