diff options
-rw-r--r-- | lib/pthreadpool/Makefile (renamed from source3/lib/pthreadpool/Makefile) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool.c (renamed from source3/lib/pthreadpool/pthreadpool.c) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool.h (renamed from source3/lib/pthreadpool/pthreadpool.h) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool_pipe.c (renamed from source3/lib/pthreadpool/pthreadpool_pipe.c) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool_pipe.h (renamed from source3/lib/pthreadpool/pthreadpool_pipe.h) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool_sync.c (renamed from source3/lib/pthreadpool/pthreadpool_sync.c) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool_tevent.c (renamed from source3/lib/pthreadpool/pthreadpool_tevent.c) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/pthreadpool_tevent.h (renamed from source3/lib/pthreadpool/pthreadpool_tevent.h) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/tests.c (renamed from source3/lib/pthreadpool/tests.c) | 0 | ||||
-rw-r--r-- | lib/pthreadpool/wscript_build (renamed from source3/lib/pthreadpool/wscript_build) | 6 | ||||
-rw-r--r-- | source3/lib/fncall.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_aio_pthread.c | 2 | ||||
-rw-r--r-- | source3/torture/bench_pthreadpool.c | 2 | ||||
-rw-r--r-- | source3/wscript | 8 | ||||
-rw-r--r-- | wscript | 10 | ||||
-rw-r--r-- | wscript_build | 1 |
16 files changed, 17 insertions, 14 deletions
diff --git a/source3/lib/pthreadpool/Makefile b/lib/pthreadpool/Makefile index 48626bd2c0a..48626bd2c0a 100644 --- a/source3/lib/pthreadpool/Makefile +++ b/lib/pthreadpool/Makefile diff --git a/source3/lib/pthreadpool/pthreadpool.c b/lib/pthreadpool/pthreadpool.c index eaddd4426d2..eaddd4426d2 100644 --- a/source3/lib/pthreadpool/pthreadpool.c +++ b/lib/pthreadpool/pthreadpool.c diff --git a/source3/lib/pthreadpool/pthreadpool.h b/lib/pthreadpool/pthreadpool.h index defbe5a9f62..defbe5a9f62 100644 --- a/source3/lib/pthreadpool/pthreadpool.h +++ b/lib/pthreadpool/pthreadpool.h diff --git a/source3/lib/pthreadpool/pthreadpool_pipe.c b/lib/pthreadpool/pthreadpool_pipe.c index d6d519aeba4..d6d519aeba4 100644 --- a/source3/lib/pthreadpool/pthreadpool_pipe.c +++ b/lib/pthreadpool/pthreadpool_pipe.c diff --git a/source3/lib/pthreadpool/pthreadpool_pipe.h b/lib/pthreadpool/pthreadpool_pipe.h index 77516f7d669..77516f7d669 100644 --- a/source3/lib/pthreadpool/pthreadpool_pipe.h +++ b/lib/pthreadpool/pthreadpool_pipe.h diff --git a/source3/lib/pthreadpool/pthreadpool_sync.c b/lib/pthreadpool/pthreadpool_sync.c index d9a95f53c61..d9a95f53c61 100644 --- a/source3/lib/pthreadpool/pthreadpool_sync.c +++ b/lib/pthreadpool/pthreadpool_sync.c diff --git a/source3/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c index 253a8673518..253a8673518 100644 --- a/source3/lib/pthreadpool/pthreadpool_tevent.c +++ b/lib/pthreadpool/pthreadpool_tevent.c diff --git a/source3/lib/pthreadpool/pthreadpool_tevent.h b/lib/pthreadpool/pthreadpool_tevent.h index de74a347e25..de74a347e25 100644 --- a/source3/lib/pthreadpool/pthreadpool_tevent.h +++ b/lib/pthreadpool/pthreadpool_tevent.h diff --git a/source3/lib/pthreadpool/tests.c b/lib/pthreadpool/tests.c index c4d2e6a1382..c4d2e6a1382 100644 --- a/source3/lib/pthreadpool/tests.c +++ b/lib/pthreadpool/tests.c diff --git a/source3/lib/pthreadpool/wscript_build b/lib/pthreadpool/wscript_build index 8195af7c322..d5304635915 100644 --- a/source3/lib/pthreadpool/wscript_build +++ b/lib/pthreadpool/wscript_build @@ -1,14 +1,14 @@ #!/usr/bin/env python if bld.env.WITH_PTHREADPOOL: - bld.SAMBA3_SUBSYSTEM('PTHREADPOOL', + bld.SAMBA_SUBSYSTEM('PTHREADPOOL', source='''pthreadpool.c pthreadpool_pipe.c pthreadpool_tevent.c ''', deps='pthread rt replace tevent-util') else: - bld.SAMBA3_SUBSYSTEM('PTHREADPOOL', + bld.SAMBA_SUBSYSTEM('PTHREADPOOL', source='''pthreadpool_sync.c pthreadpool_pipe.c pthreadpool_tevent.c @@ -16,7 +16,7 @@ else: deps='replace tevent-util') -bld.SAMBA3_BINARY('pthreadpooltest', +bld.SAMBA_BINARY('pthreadpooltest', source='tests.c', deps='PTHREADPOOL', enabled=bld.env.WITH_PTHREADPOOL, diff --git a/source3/lib/fncall.c b/source3/lib/fncall.c index 0923c148dba..34db4725e89 100644 --- a/source3/lib/fncall.c +++ b/source3/lib/fncall.c @@ -20,7 +20,7 @@ #include "includes.h" #include "../lib/util/tevent_unix.h" -#include "lib/pthreadpool/pthreadpool_pipe.h" +#include "../lib/pthreadpool/pthreadpool_pipe.h" struct fncall_state { struct fncall_context *ctx; diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index 6edf250ebdc..97ae86f999f 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -26,7 +26,7 @@ #include "system/shmem.h" #include "smbd/smbd.h" #include "smbd/globals.h" -#include "lib/pthreadpool/pthreadpool_pipe.h" +#include "../lib/pthreadpool/pthreadpool_pipe.h" #ifdef HAVE_LINUX_FALLOC_H #include <linux/falloc.h> #endif diff --git a/source3/torture/bench_pthreadpool.c b/source3/torture/bench_pthreadpool.c index 82a84cf53cd..4269b5360f8 100644 --- a/source3/torture/bench_pthreadpool.c +++ b/source3/torture/bench_pthreadpool.c @@ -19,7 +19,7 @@ */ #include "includes.h" -#include "lib/pthreadpool/pthreadpool_pipe.h" +#include "../lib/pthreadpool/pthreadpool_pipe.h" #include "proto.h" extern int torture_numops; diff --git a/source3/wscript b/source3/wscript index 443affd64e2..821d4ed114f 100644 --- a/source3/wscript +++ b/source3/wscript @@ -46,7 +46,6 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('quotas') opt.SAMBA3_ADD_OPTION('sendfile-support') opt.SAMBA3_ADD_OPTION('utmp') - opt.SAMBA3_ADD_OPTION('pthreadpool', with_name="enable", without_name="disable", default=True) opt.SAMBA3_ADD_OPTION('avahi', with_name="enable", without_name="disable") opt.SAMBA3_ADD_OPTION('iconv') opt.SAMBA3_ADD_OPTION('acl-support') @@ -1564,13 +1563,6 @@ main() { conf.DEFINE('WITH_PROFILE', 1); conf.CHECK_FUNCS('getrusage', headers="sys/time.h sys/resource.h") - if Options.options.with_pthreadpool: - if conf.CONFIG_SET('HAVE_PTHREAD'): - conf.DEFINE('WITH_PTHREADPOOL', '1') - else: - Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") - conf.undefine('WITH_PTHREADPOOL') - 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') @@ -9,6 +9,7 @@ VERSION=None import sys, os, tempfile sys.path.insert(0, srcdir+"/buildtools/wafsamba") import wafsamba, Options, samba_dist, samba_git, Scripting, Utils, samba_version +import Logs, samba_utils samba_dist.DIST_DIRS('.') @@ -44,6 +45,7 @@ def set_options(opt): opt.RECURSE('source3') opt.RECURSE('lib/util') opt.RECURSE('ctdb') + opt.samba_add_onoff_option('pthreadpool', with_name="enable", without_name="disable", default=True) opt.add_option('--with-system-mitkrb5', help='enable system MIT krb5 build (includes Samba 4 client and Samba 3 code base).'+ @@ -183,6 +185,14 @@ def configure(conf): if Options.options.with_system_mitkrb5: raise Utils.WafError('--with-ntvfs-fileserver conflicts with --with-system-mitkrb5') conf.DEFINE('WITH_NTVFS_FILESERVER', 1) + + if Options.options.with_pthreadpool: + if conf.CONFIG_SET('HAVE_PTHREAD'): + conf.DEFINE('WITH_PTHREADPOOL', '1') + else: + Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") + conf.undefine('WITH_PTHREADPOOL') + conf.RECURSE('source3') conf.RECURSE('lib/texpect') if conf.env.with_ctdb: diff --git a/wscript_build b/wscript_build index 0c3a2aee864..954eed11061 100644 --- a/wscript_build +++ b/wscript_build @@ -145,6 +145,7 @@ bld.RECURSE('source4/scripting') bld.RECURSE('pidl') bld.RECURSE('lib') bld.RECURSE('libds/common') +bld.RECURSE('lib/pthreadpool') bld.RECURSE('source3') bld.RECURSE('dfs_server') bld.RECURSE('file_server') |