1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

Move pthreadpool to top of the tree.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Matthieu Patou 2017-02-03 15:13:49 -08:00 committed by Jeremy Allison
parent 3e2a36774f
commit dd25d75b96
16 changed files with 17 additions and 14 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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')

10
wscript
View File

@ -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:

View File

@ -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')