summaryrefslogtreecommitdiff
path: root/lib/replace/replace.h
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-21 00:13:54 +0400
committerMatthieu Patou <mat@matws.net>2010-10-22 01:00:53 +0400
commit2d0ac59fcc490517b202180f49b178ab80c2534e (patch)
tree8d4ea0c932fec9cb4ab88b4586e54513e596cee9 /lib/replace/replace.h
parentc529317fe2b48e045b35a613cfd1ad3f03b68435 (diff)
downloadsamba-2d0ac59fcc490517b202180f49b178ab80c2534e.tar.gz
samba-2d0ac59fcc490517b202180f49b178ab80c2534e.tar.bz2
samba-2d0ac59fcc490517b202180f49b178ab80c2534e.zip
replace: use a wrapper around strtoll if it didn't behave as expected
Diffstat (limited to 'lib/replace/replace.h')
-rw-r--r--lib/replace/replace.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 10c7ee701c..8f820a949c 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -283,14 +283,26 @@ char *rep_strcasestr(const char *haystack, const char *needle);
char *rep_strtok_r(char *s, const char *delim, char **save_ptr);
#endif
+
+
#ifndef HAVE_STRTOLL
+long long int rep_strtoll(const char *str, char **endptr, int base);
#define strtoll rep_strtoll
+#else
+#ifdef HAVE_BSD_STRTOLL
long long int rep_strtoll(const char *str, char **endptr, int base);
+#define strtoll rep_strtoll
+#endif
#endif
#ifndef HAVE_STRTOULL
#define strtoull rep_strtoull
unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
+#else
+#ifdef HAVE_BSD_STRTOLL
+long long int rep_strtoull(const char *str, char **endptr, int base);
+#define strtoull rep_strtoull
+#endif
#endif
#ifndef HAVE_FTRUNCATE