From ace75bd871a94e66f9b589024247dd63ff985bea Mon Sep 17 00:00:00 2001 From: Sven Peter Date: Mon, 14 Apr 2008 22:05:18 +0200 Subject: [PATCH] removed the win32 stuff. use henke37 and dasda's gui --- tcploader/pc/Makefile | 19 +------------------ tcploader/pc/main.c | 22 ---------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/tcploader/pc/Makefile b/tcploader/pc/Makefile index f47fa2b..b949c7a 100644 --- a/tcploader/pc/Makefile +++ b/tcploader/pc/Makefile @@ -6,18 +6,7 @@ CC = gcc OBJS = main.o CFLAGS = -Wall -pedantic -g -WIN_OUTPUT = sendelf.exe -WIN_CC = i686-mingw32-gcc - -WIN_OBJS = main.wo -WIN_CFLAGS = -Wall -pedantic -g -WIN_LDFLAGS = -lwsock32 - -all: win32 linux - -win32: $(WIN_OUTPUT) - -linux: $(OUTPUT) +all: $(OUTPUT) clean: rm -f $(OBJS) $(WIN_OBJS) $(OUTPUT) $(WIN_OUTPUT) @@ -25,11 +14,5 @@ clean: $(OUTPUT): $(OBJS) gcc -o $@ $< -$(WIN_OUTPUT): $(WIN_OBJS) - $(WIN_CC) -o $@ $< $(WIN_LDFLAGS) - -%.wo: %.c - $(WIN_CC) $(WIN_CFLAGS) -c -o $@ $< - %.o: %.c gcc $(CFLAGS) -c -o $@ $< diff --git a/tcploader/pc/main.c b/tcploader/pc/main.c index f10e813..0932a06 100644 --- a/tcploader/pc/main.c +++ b/tcploader/pc/main.c @@ -2,18 +2,12 @@ #include #include -#ifdef __WIN32__ -#include -#include -#define close(s) closesocket(s) -#else #include #include #include #include #include #include -#endif #define BUFFER_SIZE 1 << 10 #define PORT 8080 @@ -43,9 +37,6 @@ int main(int argc, char *argv[]) int size, size2; int sock; struct sockaddr_in addr; -#ifdef __WIN32__ - WSADATA wsa; -#endif if(argc != 3) { @@ -53,14 +44,6 @@ int main(int argc, char *argv[]) return -1; } -#ifdef __WIN32__ - if (WSAStartup(MAKEWORD(1, 1), &wsa)) - { - printf("WSAStartup() failed, %lu\n", (unsigned long)GetLastError()); - return EXIT_FAILURE; - } -#endif - fd = fopen(argv[2], "rb"); if(fd == NULL) { @@ -68,12 +51,7 @@ int main(int argc, char *argv[]) return -1; } -#ifdef __WIN32__ - addr.sin_addr.S_un.S_addr = inet_addr(argv[1]); - if(addr.sin_addr.S_un.S_addr == INADDR_NONE) -#else if(inet_aton(argv[1], &addr.sin_addr) == 0) -#endif { perror("inet_aton failed"); fclose(fd); -- 2.11.4.GIT