]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CONTRIB: merge ip6range with iprange
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 12:33:40 +0000 (14:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 15:48:42 +0000 (17:48 +0200)
No need to have two separate sub-projects doing the same thing, let's
merge them.

contrib/ip6range/Makefile [deleted file]
contrib/iprange/Makefile
contrib/iprange/ip6range.c [moved from contrib/ip6range/ip6range.c with 99% similarity]

diff --git a/contrib/ip6range/Makefile b/contrib/ip6range/Makefile
deleted file mode 100644 (file)
index 55849b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-CC       = gcc
-OPTIMIZE = -O3
-LDFLAGS  = -s
-
-OBJS     = ip6range
-
-all: $(OBJS)
-
-%: %.c
-       $(CC) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
-
-clean:
-       rm -f $(OBJS) *.o *.a *~
index b3c72eda50a3e39c781f0e305cc370213092fe54..13598d8b4d98bb00687c24c6355fe80a57aedaab 100644 (file)
@@ -1,8 +1,8 @@
-CC       = gcc
+CC       = cc
 OPTIMIZE = -O3
 LDFLAGS  = -s
 
-OBJS     = iprange
+OBJS     = iprange ip6range
 
 all: $(OBJS)
 
similarity index 99%
rename from contrib/ip6range/ip6range.c
rename to contrib/iprange/ip6range.c
index 62d46e52e1c088a60a7738d48ec0e1e30286789b..2ffd4902c3cf79811c2a0e36d0cb7208b2940b84 100644 (file)
@@ -314,7 +314,7 @@ static void usage(const char *argv0)
                "\n", argv0);
 }
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
        char line[MAXLINE];
        int l, lnum;
@@ -393,4 +393,5 @@ main(int argc, char **argv)
                        convert_range(&sa, &da, he, NULL);
                }
        }
+       return 0;
 }