[SCM] Samba Shared Repository - branch master updated
Björn Jacke
bjacke at samba.org
Mon Jan 25 16:19:43 MST 2010
The branch, master has been updated
via 5439e1a... s3: fix detection and flags for using pthread
via 60a3086... s3: remove unused variable
via 38be40f... s3:async_smb: remove unused variable
via b6839e1... libreplace: fix unused varibale warning on IRIX
via 9536d94... s3: remove unused Variable
via 55d4482... s3:netapi: remove unused variable
from 463aa06... lib/popt: Fix typo in README.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5439e1a03f66ff9722987f908babfd71ebd698f1
Author: Björn Jacke <bj at sernet.de>
Date: Tue Jan 26 00:17:10 2010 +0100
s3: fix detection and flags for using pthread
I hope this fixes the build on Tru64, IRIX and maybe bug #6983
commit 60a3086d78d9cf445034172f594325cb7b929d24
Author: Björn Jacke <bj at sernet.de>
Date: Mon Jan 25 23:24:35 2010 +0100
s3: remove unused variable
commit 38be40f63c9fd2eecb840badaff23b915bc20fee
Author: Björn Jacke <bj at sernet.de>
Date: Mon Jan 25 23:23:49 2010 +0100
s3:async_smb: remove unused variable
commit b6839e1bfd10d28046f75f9f9c25f8af2665eda3
Author: Björn Jacke <bj at sernet.de>
Date: Mon Jan 25 23:07:24 2010 +0100
libreplace: fix unused varibale warning on IRIX
commit 9536d94d5478b63fc05047964b40d8786a7246c4
Author: Björn Jacke <bj at sernet.de>
Date: Mon Jan 25 23:00:14 2010 +0100
s3: remove unused Variable
Jeremy, please check!
commit 55d448254a9994ecace63c077dc7768675ea3c98
Author: Björn Jacke <bj at sernet.de>
Date: Mon Jan 25 22:57:36 2010 +0100
s3:netapi: remove unused variable
-----------------------------------------------------------------------
Summary of changes:
lib/replace/strptime.c | 4 +-
source3/Makefile.in | 4 +-
source3/configure.in | 64 ++++++++++++++++++++++++++++------
source3/lib/netapi/group.c | 2 -
source3/libsmb/async_smb.c | 2 -
source3/libsmb/clireadwrite.c | 2 -
source3/libsmb/libsmb_thread_posix.c | 4 ++
source3/smbd/dosmode.c | 4 --
8 files changed, 61 insertions(+), 25 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/strptime.c b/lib/replace/strptime.c
index 0e40f75..568823f 100644
--- a/lib/replace/strptime.c
+++ b/lib/replace/strptime.c
@@ -251,7 +251,6 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
enum locale_status *decided;
int era_cnt;
{
- const char *rp_backup;
int cnt;
size_t val;
int have_I, is_pm;
@@ -261,6 +260,7 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
int have_yday;
int have_mon, have_mday;
#ifdef _NL_CURRENT
+ const char *rp_backup;
size_t num_eras;
#endif
struct era_entry *era;
@@ -297,10 +297,10 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
#ifndef _NL_CURRENT
/* We need this for handling the `E' modifier. */
start_over:
-#endif
/* Make back up of current processing pointer. */
rp_backup = rp;
+#endif
switch (*fmt++)
{
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9d67b44..d75420e 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -72,7 +72,7 @@ NSCD_LIBS=@NSCD_LIBS@
UUID_LIBS=@UUID_LIBS@
LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@
LIBWBCLIENT_LIBS=@LIBWBCLIENT_LIBS@
-WINBIND_NSS_PTHREAD=@WINBIND_NSS_PTHREAD@
+WINBIND_NSS_PTHREAD_LDFLAGS=@PTHREAD_LDFLAGS@
DNSSD_LIBS=@DNSSD_LIBS@
AVAHI_LIBS=@AVAHI_LIBS@
POPT_LIBS=@POPTLIBS@
@@ -2527,7 +2527,7 @@ bin/vlp at EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
@WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
@echo "Linking $@"
@$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
- $(LIBREPLACE_LIBS) $(WINBIND_NSS_PTHREAD) \
+ $(LIBREPLACE_LIBS) $(WINBIND_NSS_PTHREAD_LDFLAGS) \
@SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
@WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) $(LIBTDB)
diff --git a/source3/configure.in b/source3/configure.in
index 82664d6..a5d0b06 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -709,7 +709,7 @@ AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}"
AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h)
AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h)
-AC_CHECK_HEADERS(limits.h float.h pthread.h libintl.h)
+AC_CHECK_HEADERS(limits.h float.h libintl.h)
AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h sys/sysctl.h)
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
@@ -6032,7 +6032,6 @@ WINBIND_NSS="../nsswitch/libnss_winbind.$SHLIBEXT"
WINBIND_WINS_NSS="../nsswitch/libnss_wins.$SHLIBEXT"
WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
NSSSONAMEVERSIONSUFFIX=""
-WINBIND_NSS_PTHREAD=""
case "$host_os" in
*linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -6174,12 +6173,6 @@ else
AC_MSG_RESULT(no$winbind_no_reason)
fi
-AC_CHECK_LIB(pthread, pthread_mutex_lock, [WINBIND_NSS_PTHREAD="-lpthread"
- AC_DEFINE(HAVE_PTHREAD, 1, [whether pthread exists])
- samba_cv_HAVE_PTHREAD=yes],
- samba_cv_HAVE_PTHREAD=no)
-
-AC_SUBST(WINBIND_NSS_PTHREAD)
AC_SUBST(WINBIND_NSS)
AC_SUBST(WINBIND_WINS_NSS)
AC_SUBST(WINBIND_NSS_LDSHFLAGS)
@@ -6335,16 +6328,65 @@ if test x"$enable_avahi" != x"no"; then
fi
fi
+
+#################################################
+# Set pthread stuff
+
+PTHREAD_CFLAGS=error
+PTHREAD_LDFLAGS=error
+
+# If it's error, then the user didn't
+# define it.
+if test "x$PTHREAD_LDFLAGS" = xerror; then
+ AC_CHECK_LIB(pthread, pthread_attr_init, [
+ PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+ PTHREAD_LDFLAGS="-lpthread" ])
+fi
+
+if test "x$PTHREAD_LDFLAGS" = xerror; then
+ AC_CHECK_LIB(pthreads, pthread_attr_init, [
+ PTHREAD_CFLAGS="-D_THREAD_SAFE"
+ PTHREAD_LDFLAGS="-lpthreads" ])
+fi
+
+if test "x$PTHREAD_LDFLAGS" = xerror; then
+ AC_CHECK_LIB(c_r, pthread_attr_init, [
+ PTHREAD_CFLAGS="-D_THREAD_SAFE -pthread"
+ PTHREAD_LDFLAGS="-pthread" ])
+fi
+
+if test "x$PTHREAD_LDFLAGS" = xerror; then
+ AC_CHECK_FUNC(pthread_attr_init, [
+ PTHREAD_CFLAGS="-D_REENTRANT"
+ PTHREAD_LDFLAGS="-lpthread" ])
+fi
+
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_LDFLAGS)
+
+samba_cv_HAVE_PTHREAD=no
+if test x"$PTHREAD_CFLAGS" != xerror -a x"$PTHREAD_LDFLAGS" != xerror; then
+ samba_cv_HAVE_PTHREAD=yes
+ # now check for pthread.h with pthread-correct CFLAGS:
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_CHECK_HEADERS(pthread.h)
+ CFLAGS=$ac_save_CFLAGS
+fi
+
#################################################
# Check if user wants pthreadpool support
+if test x"$enable_pthreadpool" = xyes -a x"$samba_cv_HAVE_PTHREAD" != x"yes"; then
+ AC_MSG_ERROR([pthread support cannot be enabled when pthread header file not found])
+fi
+
AC_ARG_ENABLE(pthreadpool,
[AS_HELP_STRING([--enable-pthreadpool], [Enable pthreads pool helper support (default=auto)])])
if test x"$enable_pthreadpool" != x"no" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; then
- AC_TRY_LINK([#include "pthread.h"],
- [pthread_create(NULL, NULL, NULL, NULL)],
- ,LIBS="$LIBS -lpthread")
+ LIBS="$LIBS $PTHREAD_LDFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_DEFINE(WITH_PTHREADPOOL, 1, [Whether to include pthreadpool helpers])
AC_SUBST(PTHREADPOOL_OBJ, "lib/pthreadpool.o")
fi
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index e707c0c..b8aa418 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1415,7 +1415,6 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
size_t num_del_rids = 0;
uint32_t *member_rids = NULL;
- size_t num_member_rids = 0;
struct GROUP_USERS_INFO_0 *i0 = NULL;
struct GROUP_USERS_INFO_1 *i1 = NULL;
@@ -1534,7 +1533,6 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
}
member_rids = user_rids.ids;
- num_member_rids = user_rids.count;
status = rpccli_samr_QueryGroupMember(pipe_cli, ctx,
&group_handle,
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index f5000e4..0667fa3 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -608,7 +608,6 @@ static void cli_smb_received(struct tevent_req *subreq)
subreq, struct cli_state);
struct tevent_req *req;
struct cli_smb_state *state;
- struct tevent_context *ev;
NTSTATUS status;
uint8_t *inbuf;
ssize_t received;
@@ -697,7 +696,6 @@ static void cli_smb_received(struct tevent_req *subreq)
req = cli->pending[i];
state = tevent_req_data(req, struct cli_smb_state);
- ev = state->ev;
if (!oplock_break /* oplock breaks are not signed */
&& !cli_check_sign_mac(cli, (char *)inbuf, state->seqnum+1)) {
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 6342de4..6567874 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -88,7 +88,6 @@ struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
{
struct tevent_req *req, *subreq;
struct cli_read_andx_state *state;
- bool bigoffset = False;
uint8_t wct = 10;
if (size > cli_read_max_bufsize(cli)) {
@@ -116,7 +115,6 @@ struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
SSVAL(state->vwv + 9, 0, 0);
if ((uint64_t)offset >> 32) {
- bigoffset = true;
SIVAL(state->vwv + 10, 0,
(((uint64_t)offset)>>32) & 0xffffffff);
wct += 2;
diff --git a/source3/libsmb/libsmb_thread_posix.c b/source3/libsmb/libsmb_thread_posix.c
index 6519659..8c8299d 100644
--- a/source3/libsmb/libsmb_thread_posix.c
+++ b/source3/libsmb/libsmb_thread_posix.c
@@ -17,8 +17,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "includes.h"
+#ifdef HAVE_PTHREAD_H
#include <pthread.h>
+#endif
#include "libsmbclient.h"
#include "libsmb_internal.h"
@@ -47,3 +50,4 @@ smbc_thread_posix(void)
{
smb_thread_set_functions(&tf);
}
+
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index aaef09b..bc39e02 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -226,7 +226,6 @@ static bool get_ea_dos_attribute(connection_struct *conn,
uint32 *pattr)
{
struct xattr_DOSATTRIB dosattrib;
- enum ndr_err_code ndr_err;
DATA_BLOB blob;
ssize_t sizeret;
fstring attrstr;
@@ -261,9 +260,6 @@ static bool get_ea_dos_attribute(connection_struct *conn,
blob.data = (uint8_t *)attrstr;
blob.length = sizeret;
- ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &dosattrib,
- (ndr_pull_flags_fn_t)ndr_pull_xattr_DOSATTRIB);
-
DEBUG(10,("get_ea_dos_attribute: %s attr = %s\n",
smb_fname_str_dbg(smb_fname), dosattrib.attrib_hex));
--
Samba Shared Repository
More information about the samba-cvs
mailing list