]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: don't use type "uint" which is not portable
authorWilly Tarreau <w@1wt.eu>
Wed, 28 May 2014 21:05:07 +0000 (23:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 May 2014 21:05:07 +0000 (23:05 +0200)
Dmitry Sivachenko reported that "uint" doesn't build on FreeBSD 10.
On Linux it's defined in sys/types.h and indicated as "old". Just
get rid of the very few occurrences.

contrib/halog/halog.c
include/common/regex.h
src/regex.c
src/standard.c

index c686de1e380a4855a2531d6bf9524f7b87a6c512..fc927bdd93425e289b78455c70ec6cca782fe9ed 100644 (file)
@@ -694,7 +694,7 @@ int main(int argc, char **argv)
        struct eb32_node *n;
        struct url_stat *ustat = NULL;
        int val, test;
-       uint uval;
+       unsigned int uval;
        int filter_acc_delay = 0, filter_acc_count = 0;
        int filter_time_resp = 0;
        int filt_http_status_low = 0, filt_http_status_high = 0;
index 63689afa36abd857ad5be1363e4594f3a7332916..2e26b673ec5534139372780c9c03229a22e8005f 100644 (file)
@@ -79,7 +79,7 @@ extern regmatch_t pmatch[MAX_MATCH];
  * The function return 1 is succes case, else return 0 and err is filled.
  */
 int regex_comp(const char *str, struct my_regex *regex, int cs, int cap, char **err);
-int exp_replace(char *dst, uint dst_size, char *src, const char *str, const regmatch_t *matches);
+int exp_replace(char *dst, unsigned int dst_size, char *src, const char *str, const regmatch_t *matches);
 const char *check_replace_string(const char *str);
 const char *chain_regex(struct hdr_exp **head, const regex_t *preg,
                        int action, const char *replace, void *cond);
index b08147711542b531636a38bf6a47fde44a6be832..a31bcda5d601ea4b698e5506b3918e11a977a1b4 100644 (file)
@@ -22,7 +22,7 @@
 /* regex trash buffer used by various regex tests */
 regmatch_t pmatch[MAX_MATCH];  /* rm_so, rm_eo for regular expressions */
 
-int exp_replace(char *dst, uint dst_size, char *src, const char *str, const regmatch_t *matches)
+int exp_replace(char *dst, unsigned int dst_size, char *src, const char *str, const regmatch_t *matches)
 {
        char *old_dst = dst;
        char* dst_end = dst + dst_size;
index 9cec295f4ead2a1040242d30bb525564e0409fab..06176d70866976b7c7324e4794802f8dcff4f40c 100644 (file)
@@ -2416,8 +2416,8 @@ char *env_expand(char *in)
 const char *strnistr(const char *str1, int len_str1, const char *str2, int len_str2)
 {
        char *pptr, *sptr, *start;
-       uint slen, plen;
-       uint tmp1, tmp2;
+       unsigned int slen, plen;
+       unsigned int tmp1, tmp2;
 
        if (str1 == NULL || len_str1 == 0) // search pattern into an empty string => search is not found
                return NULL;