[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-981-gb496f13

Jeremy Allison jra at samba.org
Fri Apr 18 07:31:07 GMT 2008


The branch, v3-2-test has been updated
       via  b496f133228b74bf613dab81167a5b9670511c51 (commit)
      from  edb0092e4d66496181de4e21c91d398d54208e60 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b496f133228b74bf613dab81167a5b9670511c51
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 18 00:30:50 2008 -0700

    Janitor for tridge. Keep lib/replace in sync with the gcc4
    changes.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/replace/libreplace_cc.m4 |    3 ++-
 source/lib/replace/replace.c        |    2 +-
 source/lib/replace/replace.h        |    2 +-
 source/librpc/ndr/ndr_basic.c       |    4 ++--
 4 files changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/libreplace_cc.m4 b/source/lib/replace/libreplace_cc.m4
index bf50568..0ce0958 100644
--- a/source/lib/replace/libreplace_cc.m4
+++ b/source/lib/replace/libreplace_cc.m4
@@ -132,7 +132,8 @@ AC_CHECK_SIZEOF(off_t)
 AC_CHECK_SIZEOF(size_t)
 AC_CHECK_SIZEOF(ssize_t)
 
-AC_CHECK_TYPE(intptr_t, unsigned long long)
+AC_CHECK_TYPE(intptr_t, long long)
+AC_CHECK_TYPE(uintptr_t, unsigned long long)
 AC_CHECK_TYPE(ptrdiff_t, unsigned long long)
 
 if test x"$ac_cv_type_long_long" != x"yes";then
diff --git a/source/lib/replace/replace.c b/source/lib/replace/replace.c
index 6930f9b..443da2a 100644
--- a/source/lib/replace/replace.c
+++ b/source/lib/replace/replace.c
@@ -458,7 +458,7 @@ char *rep_strcasestr(const char *haystack, const char *needle)
 	for (s=haystack;*s;s++) {
 		if (toupper(*needle) == toupper(*s) &&
 		    strncasecmp(s, needle, nlen) == 0) {
-			return (char *)((intptr_t)s);
+			return (char *)((uintptr_t)s);
 		}
 	}
 	return NULL;
diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h
index 5fe7939..bf95169 100644
--- a/source/lib/replace/replace.h
+++ b/source/lib/replace/replace.h
@@ -499,7 +499,7 @@ typedef int bool;
   Also, please call this via the discard_const_p() macro interface, as that
   makes the return type safe.
 */
-#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
 
 /** Type-safe version of discard_const */
 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
diff --git a/source/librpc/ndr/ndr_basic.c b/source/librpc/ndr/ndr_basic.c
index f342c6e..c8fa70b 100644
--- a/source/librpc/ndr/ndr_basic.c
+++ b/source/librpc/ndr/ndr_basic.c
@@ -196,7 +196,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_hyper(struct ndr_pull *ndr, int ndr_flags, u
 */
 _PUBLIC_ enum ndr_err_code ndr_pull_pointer(struct ndr_pull *ndr, int ndr_flags, void* *v)
 {
-	intptr_t h;
+	uintptr_t h;
 	NDR_PULL_ALIGN(ndr, sizeof(h));
 	NDR_PULL_NEED_BYTES(ndr, sizeof(h));
 	memcpy(&h, ndr->data+ndr->offset, sizeof(h));
@@ -393,7 +393,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_hyper(struct ndr_push *ndr, int ndr_flags, u
 */
 _PUBLIC_ enum ndr_err_code ndr_push_pointer(struct ndr_push *ndr, int ndr_flags, void* v)
 {
-	intptr_t h = (intptr_t)v;
+	uintptr_t h = (intptr_t)v;
 	NDR_PUSH_ALIGN(ndr, sizeof(h));
 	NDR_PUSH_NEED_BYTES(ndr, sizeof(h));
 	memcpy(ndr->data+ndr->offset, &h, sizeof(h));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list