diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-08-20 22:50:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:14 -0500 |
commit | 43afd3fda8c0aba14b2f41778b050c0a93d64253 (patch) | |
tree | bd05161cbd971b62ba9d56887571c6d26641fbff | |
parent | e205ffd83c36c485bcd07de318e0a1bb506f8415 (diff) | |
download | samba-43afd3fda8c0aba14b2f41778b050c0a93d64253.tar.gz samba-43afd3fda8c0aba14b2f41778b050c0a93d64253.tar.bz2 samba-43afd3fda8c0aba14b2f41778b050c0a93d64253.zip |
r1973: for systems that don't have strtoull() try strtouq(). This should fix
the build for some BSD varients.
(This used to be commit 73e9ee791472bb212efe0eb4744daa91678263ad)
-rw-r--r-- | source4/build/m4/rewrite.m4 | 2 | ||||
-rw-r--r-- | source4/lib/replace.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4 index b6ced8db97..10eb025876 100644 --- a/source4/build/m4/rewrite.m4 +++ b/source4/build/m4/rewrite.m4 @@ -404,7 +404,7 @@ if test x"$ac_cv_func_execl" = x"no"; then EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun\$(EXEEXT)" fi -AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64) +AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strtoull strtouq strerror chown fchown chmod fchmod chroot link mknod mknod64) AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid) AC_CHECK_FUNCS(memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) diff --git a/source4/lib/replace.c b/source4/lib/replace.c index de32d377d5..64234f7042 100644 --- a/source4/lib/replace.c +++ b/source4/lib/replace.c @@ -468,3 +468,15 @@ char *rep_inet_ntoa(struct in_addr ip) return ret; } #endif + + +#ifndef HAVE_STRTOULL + unsigned long long int strtoull(const char *str, char **endptr, int base) +{ +#ifdef HAVE_STRTOUQ + return strtouq(str, endptr, base); +#else +#error "system must support 64 bit integer read from strings" +#endif +} +#endif |