summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2010-08-25 04:19:10 +0200
committerberkeviktor@aol.com <berkeviktor@aol.com>2010-08-25 04:19:10 +0200
commite0b7f0008b1ff2d9eddeaba8be0b35e1e40f5e49 (patch)
treed20a2dad25607e01451f8f0955a75335933d6f46
parent4328d4ffc14de437523376b9057ee522714c9833 (diff)
xchat-text compiles but won't run
-rw-r--r--src/fe-text/makefile.mak14
-rw-r--r--src/makefile.mak2
-rw-r--r--xchat-wdk.patch78
3 files changed, 94 insertions, 0 deletions
diff --git a/src/fe-text/makefile.mak b/src/fe-text/makefile.mak
new file mode 100644
index 00000000..abca9985
--- /dev/null
+++ b/src/fe-text/makefile.mak
@@ -0,0 +1,14 @@
+include "..\makeinc.mak"

+

+COMLIB = ..\common\xchatcommon.lib

+PROG = xchat-text.exe

+

+all: fe-text.obj

+	link /out:$(PROG) /entry:mainCRTStartup $(LDFLAGS) $(LIBS) $(COMLIB) fe-text.obj

+

+fe-text.obj: fe-text.c makefile.mak

+	cl $(CFLAGS) $(GLIB) fe-text.c

+

+clean:

+	del *.obj

+	del $(PROG)

diff --git a/src/makefile.mak b/src/makefile.mak
index 595202d2..700ba6e6 100644
--- a/src/makefile.mak
+++ b/src/makefile.mak
@@ -3,6 +3,8 @@ all:
 	@-$(MAKE) /nologo /s /f makefile.mak $@
 	@cd ..\fe-gtk
 	@-$(MAKE) /nologo /s /f makefile.mak $@
+#	@cd ..\fe-text
+#	@-$(MAKE) /nologo /s /f makefile.mak $@
 
 clean:
 	@del common\*.obj
diff --git a/xchat-wdk.patch b/xchat-wdk.patch
index 8a253ff5..fbc5b024 100644
--- a/xchat-wdk.patch
+++ b/xchat-wdk.patch
@@ -1078,3 +1078,81 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/xtext.c xchat-wdk/src/fe
  #include <gtk/gtkmain.h>
  #include <gtk/gtksignal.h>
  #include <gtk/gtkselection.h>
+diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-text/fe-text.c xchat-wdk/src/fe-text/fe-text.c
+--- xchat-wdk.orig/src/fe-text/fe-text.c	2008-08-29 13:24:17 +0200
++++ xchat-wdk/src/fe-text/fe-text.c	2010-08-25 04:16:04 +0200
+@@ -22,9 +22,13 @@
+ #ifdef HAVE_STRINGS_H
+ #include <strings.h>
+ #endif
++#ifdef WIN32
++#define STDIN_FILENO 0
++#define STDOUT_FILENO 1
++#else
+ #include <sys/time.h>
++#endif
+ #include <sys/types.h>
+-#include <unistd.h>
+ #include <ctype.h>
+ #include "../common/xchat.h"
+ #include "../common/xchatc.h"
+@@ -339,7 +343,11 @@
+ 	te->callback = callback;
+ 	te->userdata = userdata;
+ 
+-	gettimeofday (&now, NULL);
++#ifdef WIN32
++		g_get_current_time (&now);
++#else
++		gettimeofday (&now, NULL);
++#endif
+ 	te->next_call = now.tv_sec * 1000 + (now.tv_usec / 1000) + te->interval;
+ 
+ 	tmr_list = g_slist_prepend (tmr_list, te);
+@@ -417,7 +425,12 @@
+ void
+ fe_main (void)
+ {
+-	struct timeval timeout, now;
++	struct timeval timeout;
++#ifdef WIN32
++	GTimeVal now;
++#else
++	struct timeval now;
++#endif
+ 	socketevent *se;
+ 	timerevent *te;
+ 	fd_set rd, wd, ex;
+@@ -428,7 +441,7 @@
+ 		new_ircwindow (NULL, NULL, SESS_SERVER, 0);
+ 
+ #ifdef ENABLE_NLS
+-	bindtextdomain (GETTEXT_PACKAGE, PREFIX"/share/locale");
++	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ 	textdomain (GETTEXT_PACKAGE);
+ #endif
+@@ -464,7 +477,11 @@
+ 				shortest = te->next_call;
+ 			list = list->next;
+ 		}
++#ifdef WIN32
++		g_get_current_time (&now);
++#else
+ 		gettimeofday (&now, NULL);
++#endif
+ 		delay = shortest - ((now.tv_sec * 1000) + (now.tv_usec / 1000));
+ 		timeout.tv_sec = delay / 1000;
+ 		timeout.tv_usec = (delay % 1000) * 1000;
+@@ -514,7 +531,11 @@
+ 		}
+ 
+ 		/* now check our list of timeout events, some might need to be called! */
++#ifdef WIN32
++		g_get_current_time (&now);
++#else
+ 		gettimeofday (&now, NULL);
++#endif
+ 		list = tmr_list;
+ 		while (list)
+ 		{