commit 0f47f4965230592f254dc7408c9999764ca7f9e0
parent 2d9e0ca3844391eb07d07fe24e26be54e516bffc
Author: cnlohr <charles@cnlohr.com>
Date: Mon, 13 Mar 2017 12:40:23 -0400
Fix dependency on Xext and Xinerama
Diffstat:
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -9,13 +9,13 @@ MINGW32:=i686-w64-mingw32-
cnping.exe : cnping.c DrawFunctions.c WinDriver.c os_generic.c ping.c
$(MINGW32)windres resources.rc -o resources.o
- $(MINGW32)gcc -g -mwindows -m32 $(CFLAGS) resources.o -o $@ $^ -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600
+ $(MINGW32)gcc -g -mwindows -m32 $(CFLAGS) resources.o -o $@ $^ -lgdi32 -lws2_32 -s -D_WIN32_WINNT=0x0600 -DWIN32
cnping : cnping.o DrawFunctions.o XDriver.o os_generic.o ping.o
- gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread -lXinerama -lXext $(LDFLAGS)
+ gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS)
cnping-mousey : cnping-mousey.o DrawFunctions.o XDriver.o os_generic.o ping.o
- gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread -lXinerama -lXext $(LDFLAGS)
+ gcc $(CFLAGS) -o $@ $^ -lX11 -lm -lpthread $(LDFLAGS)
searchnet : os_generic.o ping.o searchnet.o
gcc $(CFLAGS) -o $@ $^ -lpthread
diff --git a/XDriver.c b/XDriver.c
@@ -2,7 +2,7 @@
//portions from
//http://www.xmission.com/~georgeps/documentation/tutorials/Xlib_Beginner.html
-#define HAS_XINERAMA
+//#define HAS_XINERAMA
#include "DrawFunctions.h"
diff --git a/cnping.exe b/cnping.exe
Binary files differ.
diff --git a/ping.c b/ping.c
@@ -39,15 +39,16 @@
void bzero(void *location,__LONG32 count);
#else
#pragma comment(lib, "Ws2_32.lib")
-void usleep(int x) {
- Sleep(x / 1000);
-}
void bzero(void * loc, int len)
{
memset(loc, 0, len);
}
#endif
+void usleep(int x) {
+ Sleep(x / 1000);
+}
+
#include <windows.h>
#include <stdio.h>
#include <winsock2.h>
diff --git a/searchnet.c b/searchnet.c
@@ -5,6 +5,7 @@
#include <arpa/inet.h>
#include <stdint.h>
#include <stdlib.h>
+#include "os_generic.h"
uint32_t my_random_key;
uint8_t send_id[4];