diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-08-25 04:19:10 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-08-25 04:19:10 +0200 |
commit | e0b7f0008b1ff2d9eddeaba8be0b35e1e40f5e49 (patch) | |
tree | d20a2dad25607e01451f8f0955a75335933d6f46 /xchat-wdk.patch | |
parent | 4328d4ffc14de437523376b9057ee522714c9833 (diff) |
xchat-text compiles but won't run
Diffstat (limited to 'xchat-wdk.patch')
-rw-r--r-- | xchat-wdk.patch | 78 |
1 files changed, 78 insertions, 0 deletions
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) + { |