aboutsummaryrefslogtreecommitdiffstats
path: root/main/samba/fix-libreplace.patch
blob: cfe24757ecbcbe95c80fc9a93f26d9af1cffff25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
--- talloc-2.1.0.orig/lib/replace/replace.c
+++ talloc-2.1.0/lib/replace/replace.c
@@ -508,28 +508,6 @@
 # error "You need a strtoll function"
 #endif
 }
-#else
-#ifdef HAVE_BSD_STRTOLL
-#ifdef HAVE_STRTOQ
-long long int rep_strtoll(const char *str, char **endptr, int base)
-{
-	long long int nb = strtoq(str, endptr, base);
-	/* In linux EINVAL is only returned if base is not ok */
-	if (errno == EINVAL) {
-		if (base == 0 || (base >1 && base <37)) {
-			/* Base was ok so it's because we were not
-			 * able to make the convertion.
-			 * Let's reset errno.
-			 */
-			errno = 0;
-		}
-	}
-	return nb;
-}
-#else
-#error "You need the strtoq function"
-#endif /* HAVE_STRTOQ */
-#endif /* HAVE_BSD_STRTOLL */
 #endif /* HAVE_STRTOLL */
 
 
@@ -546,28 +524,6 @@
 # error "You need a strtoull function"
 #endif
 }
-#else
-#ifdef HAVE_BSD_STRTOLL
-#ifdef HAVE_STRTOUQ
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
-{
-	unsigned long long int nb = strtouq(str, endptr, base);
-	/* In linux EINVAL is only returned if base is not ok */
-	if (errno == EINVAL) {
-		if (base == 0 || (base >1 && base <37)) {
-			/* Base was ok so it's because we were not
-			 * able to make the convertion.
-			 * Let's reset errno.
-			 */
-			errno = 0;
-		}
-	}
-	return nb;
-}
-#else
-#error "You need the strtouq function"
-#endif /* HAVE_STRTOUQ */
-#endif /* HAVE_BSD_STRTOLL */
 #endif /* HAVE_STRTOULL */
 
 #ifndef HAVE_SETENV
--- talloc-2.1.0.orig/lib/replace/replace.h
+++ talloc-2.1.0/lib/replace/replace.h
@@ -355,21 +355,11 @@
 #ifndef HAVE_STRTOLL
 #define strtoll rep_strtoll
 long long int rep_strtoll(const char *str, char **endptr, int base);
-#else
-#ifdef HAVE_BSD_STRTOLL
-#define strtoll rep_strtoll
-long long int rep_strtoll(const char *str, char **endptr, int base);
 #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 /* yes, it's not HAVE_BSD_STRTOULL */
-#define strtoull rep_strtoull
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
-#endif
 #endif
 
 #ifndef HAVE_FTRUNCATE