From 6a6dabe66809f4c33b4f71c8825a943ea6b08674 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Apr 2021 14:33:40 +0200 Subject: [PATCH] CONTRIB: merge ip6range with iprange No need to have two separate sub-projects doing the same thing, let's merge them. --- contrib/ip6range/Makefile | 13 ------------- contrib/iprange/Makefile | 4 ++-- contrib/{ip6range => iprange}/ip6range.c | 3 ++- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 contrib/ip6range/Makefile rename contrib/{ip6range => iprange}/ip6range.c (99%) diff --git a/contrib/ip6range/Makefile b/contrib/ip6range/Makefile deleted file mode 100644 index 55849b6de..000000000 --- a/contrib/ip6range/Makefile +++ /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 *~ diff --git a/contrib/iprange/Makefile b/contrib/iprange/Makefile index b3c72eda5..13598d8b4 100644 --- a/contrib/iprange/Makefile +++ b/contrib/iprange/Makefile @@ -1,8 +1,8 @@ -CC = gcc +CC = cc OPTIMIZE = -O3 LDFLAGS = -s -OBJS = iprange +OBJS = iprange ip6range all: $(OBJS) diff --git a/contrib/ip6range/ip6range.c b/contrib/iprange/ip6range.c similarity index 99% rename from contrib/ip6range/ip6range.c rename to contrib/iprange/ip6range.c index 62d46e52e..2ffd4902c 100644 --- a/contrib/ip6range/ip6range.c +++ b/contrib/iprange/ip6range.c @@ -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; }