]> Nishi Git Mirror - libw3.git/commitdiff
windows openssl support
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 22 Jan 2024 06:39:07 +0000 (06:39 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Mon, 22 Jan 2024 06:39:07 +0000 (06:39 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@53 d27a3e52-49c5-7645-884c-6793ebffc270

Example/fetch.c
Library/DNS.c
Library/Makefile

index 4728b182f720f6e6deab2f7ed0e67a56ea6eab05..fc86cd3956f140b6a03b3287c2e83371316ba80c 100644 (file)
@@ -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]);
index a3b61796d5df9d81d3d36df87c1f78595be3fbc9..ed29f21894d5388e9af24e4ebd077abdb50d7f6f 100644 (file)
@@ -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");
                }
index c1daadc215657d5087509115e918c86a3405f083..c457acda27bb388f54d018d66872609bcf6f77af 100644 (file)
@@ -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