From: nishi Date: Mon, 22 Jan 2024 06:39:07 +0000 (+0000) Subject: windows openssl support X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=99599f2b4e6101c5a0c3a232477c5c9a5b2dae09;p=libw3.git windows openssl support git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@53 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/fetch.c b/Example/fetch.c index 4728b18..fc86cd3 100644 --- a/Example/fetch.c +++ b/Example/fetch.c @@ -36,7 +36,7 @@ int main(int argc, char** argv){ return 1; } W3_Library_Init(); - struct W3* w3 = W3_Create("http", argv[1], 80); + struct W3* w3 = W3_Create("https", argv[1], 443); if(w3 != NULL){ W3_Set_Read_Size(w3, 1024); W3_Set_Method(w3, argv[3] == NULL ? "GET" : argv[3]); diff --git a/Library/DNS.c b/Library/DNS.c index a3b6179..ed29f21 100644 --- a/Library/DNS.c +++ b/Library/DNS.c @@ -85,7 +85,6 @@ int __W3_DNS_Connect(const char* hostname, bool ssl, uint16_t port *o_ssl = NULL; close(sock); sock = -1; - }else{ __W3_Debug("SSL", "Connected"); } diff --git a/Library/Makefile b/Library/Makefile index c1daadc..c457acd 100644 --- a/Library/Makefile +++ b/Library/Makefile @@ -5,7 +5,7 @@ OBJS = ./Core.o ./Util.o ./DNS.o ./HTTP.o ./File.o ifeq ($(WINDOWS),YES) ./w3.dll: $(OBJS) - $(CC) $(LDFLAGS) -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS) + $(CC) $(LDFLAGS) -L../openssl/lib/mingw/x64 -shared -Wl,--out-implib,./w3.lib -o $@ $^ $(LIBS) else ./libw3.so: $(OBJS) $(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS) @@ -14,7 +14,7 @@ else endif ./%.o: ./%.c W3%.h - $(CC) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -I../openssl/include -c -o $@ $< clean: rm -f *.o *.so *.core *~ *.dll *.lib *.a *.res