1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 10:43:12 +02:00

Split url.c into url_curl.c (curl implementation) and url_unreal

(the new fallback https-only implementation).

./configure will set URL= to either url_curl.o or url_unreal.o
depending on whether curl is enabled or not.

The 3 functions that both implementations had in common are now in
src/misc.c: url_is_valid(), displayurl() and url_getfilename().
This commit is contained in:
Bram Matthys
2021-08-21 08:47:38 +02:00
parent 00f3f300f0
commit 2c7d2c8f86
7 changed files with 445 additions and 388 deletions
+8 -3
View File
@@ -33,7 +33,7 @@ OBJS=dns.o auth.o channel.o crule.o dbuf.o \
api-event.o \
crypt_blowfish.o unrealdb.o updconf.o crashreport.o modulemanager.o \
utf8.o log.o \
openssl_hostname_validation.o url.o
openssl_hostname_validation.o $(URL)
SRC=$(OBJS:%.o=%.c)
@@ -245,8 +245,13 @@ log.o: log.c $(INCLUDES)
openssl_hostname_validation.o: openssl_hostname_validation.c $(INCLUDES)
$(CC) $(CFLAGS) $(BINCFLAGS) -c openssl_hostname_validation.c
url.o: url.c $(INCLUDES)
$(CC) $(CFLAGS) $(BINCFLAGS) -c url.c
# The cURL implementation...
url_curl.o: url_curl.c $(INCLUDES)
$(CC) $(CFLAGS) $(BINCFLAGS) -c url_curl.c
# ... or our implementation.
url_unreal.o: url_unreal.c $(INCLUDES)
$(CC) $(CFLAGS) $(BINCFLAGS) -c url_unreal.c
# DO NOT DELETE THIS LINE -- make depend depends on it.