summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-04-18 00:30:50 -0700
committerJeremy Allison <jra@samba.org>2008-04-18 00:30:50 -0700
commite90b4061c134486fd3958ea11a28af9801bcc6a2 (patch)
treeef823d86f9ff29339c73ac1d25bbc6015c939ccc /source3/lib
parent4f46c2d9268ffb418e4f43baf479c03384e2ddda (diff)
downloadsamba-e90b4061c134486fd3958ea11a28af9801bcc6a2.tar.gz
samba-e90b4061c134486fd3958ea11a28af9801bcc6a2.tar.bz2
samba-e90b4061c134486fd3958ea11a28af9801bcc6a2.zip
Janitor for tridge. Keep lib/replace in sync with the gcc4
changes. Jeremy. (This used to be commit b496f133228b74bf613dab81167a5b9670511c51)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/replace/libreplace_cc.m43
-rw-r--r--source3/lib/replace/replace.c2
-rw-r--r--source3/lib/replace/replace.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/replace/libreplace_cc.m4 b/source3/lib/replace/libreplace_cc.m4
index bf5056838d..0ce0958a96 100644
--- a/source3/lib/replace/libreplace_cc.m4
+++ b/source3/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/source3/lib/replace/replace.c b/source3/lib/replace/replace.c
index 6930f9b079..443da2ab24 100644
--- a/source3/lib/replace/replace.c
+++ b/source3/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/source3/lib/replace/replace.h b/source3/lib/replace/replace.h
index 5fe79394eb..bf95169352 100644
--- a/source3/lib/replace/replace.h
+++ b/source3/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))