]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Janitor for tridge. Keep lib/replace in sync with the gcc4
authorJeremy Allison <jra@samba.org>
Fri, 18 Apr 2008 07:30:50 +0000 (00:30 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 18 Apr 2008 07:30:50 +0000 (00:30 -0700)
changes.
Jeremy.

source/lib/replace/libreplace_cc.m4
source/lib/replace/replace.c
source/lib/replace/replace.h
source/librpc/ndr/ndr_basic.c

index bf5056838d0ca2a30539ca5bc75f1104f38bf562..0ce0958a96d34f8f8c066486d6ccfa69a254986f 100644 (file)
@@ -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
index 6930f9b0791c057deeb8045be91b085d25f662ff..443da2ab24e1894c376cbe1181fbbe7567b554be 100644 (file)
@@ -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;
index 5fe79394ebf63fd4bb1d7bfeb96e9a163e38cfed..bf95169352ecb9cebde68b3abcdc31a9da36efec 100644 (file)
@@ -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))
index f342c6e36f970ec8cec928c6ead4ac094c03d13a..c8fa70b1851d042d86bc4cb2a5120ccdc25be518 100644 (file)
@@ -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));