c.sexchat/xchat-wdk.patch

765 lines
23 KiB
Diff

diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/perl/perl.c xchat-wdk/plugins/perl/perl.c
--- xchat-wdk.orig/plugins/perl/perl.c 2010-03-23 01:06:59 +0100
+++ xchat-wdk/plugins/perl/perl.c 2010-03-30 01:17:15 +0200
@@ -16,13 +16,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+#define _INC_DIRENT
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <dirent.h>
+#include "../../src/common/dirent.h"
#ifdef ENABLE_NLS
#include <locale.h>
#endif
diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/python/python.c xchat-wdk/plugins/python/python.c
--- xchat-wdk.orig/plugins/python/python.c 2010-03-17 09:07:51 +0100
+++ xchat-wdk/plugins/python/python.c 2010-03-31 13:25:58 +0200
@@ -51,12 +51,13 @@
*
*/
+#define _INC_DIRENT
#include <glib.h>
#include <string.h>
-#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
-#include <dirent.h>
+#include "../../src/common/dirent.h"
+#include "../../config.h"
#include "xchat-plugin.h"
#include "Python.h"
@@ -68,7 +69,7 @@
#ifdef WIN32
#undef WITH_THREAD /* Thread support locks up xchat on Win32. */
-#define VERSION "0.8/2.4" /* Linked to python24.dll */
+#define VERSION "0.8/2.5" /* Linked to python24.dll */
#else
#define VERSION "0.8"
#endif
diff -ruN --strip-trailing-cr xchat-wdk.orig/plugins/tcl/tclplugin.c xchat-wdk/plugins/tcl/tclplugin.c
--- xchat-wdk.orig/plugins/tcl/tclplugin.c 2010-03-21 01:49:42 +0100
+++ xchat-wdk/plugins/tcl/tclplugin.c 2010-03-29 12:57:17 +0200
@@ -32,8 +32,6 @@
#include <windows.h>
#define bzero(mem, sz) memset((mem), 0, (sz))
#define bcopy(src, dest, count) memmove((dest), (src), (count))
-#else
-#include <unistd.h>
#endif
#include "xchat-plugin.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src/common/cfgfiles.c
--- xchat-wdk.orig/src/common/cfgfiles.c 2009-01-02 06:56:12 +0100
+++ xchat-wdk/src/common/cfgfiles.c 2010-04-02 08:25:16 +0200
@@ -17,7 +17,6 @@
*/
#include <fcntl.h>
-#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -670,14 +669,14 @@
prefs.autoopendccchatwindow = 1;
prefs.userhost = 1;
prefs.gui_url_mod = 4; /* ctrl */
- prefs.gui_tray = 1;
+ prefs.gui_tray = 0;
prefs.gui_pane_left_size = 100;
prefs.gui_pane_right_size = 100;
prefs.mainwindow_save = 1;
prefs.bantype = 2;
prefs.input_balloon_time = 20;
- prefs.input_flash_priv = prefs.input_flash_hilight = 1;
- prefs.input_tray_priv = prefs.input_tray_hilight = 1;
+ prefs.input_flash_priv = prefs.input_flash_hilight = prefs.input_flash_chans = 0;
+ prefs.input_tray_priv = prefs.input_tray_hilight = prefs.input_tray_chans = 0;
prefs.autodccsend = 2; /* browse mode */
#ifdef WIN32
prefs.identd = 1;
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/chanopt.c xchat-wdk/src/common/chanopt.c
--- xchat-wdk.orig/src/common/chanopt.c 2008-06-15 06:40:29 +0200
+++ xchat-wdk/src/common/chanopt.c 2010-03-29 12:58:02 +0200
@@ -3,7 +3,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/ctcp.c xchat-wdk/src/common/ctcp.c
--- xchat-wdk.orig/src/common/ctcp.c 2006-10-03 06:11:54 +0200
+++ xchat-wdk/src/common/ctcp.c 2010-03-31 12:43:27 +0200
@@ -18,7 +18,6 @@
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
#include <stdlib.h>
#include "xchat.h"
@@ -130,7 +129,7 @@
if (!strcasecmp (msg, "VERSION") && !prefs.hidever)
{
- snprintf (outbuf, sizeof (outbuf), "VERSION xchat "PACKAGE_VERSION" %s",
+ snprintf (outbuf, sizeof (outbuf), "VERSION xchat-wdk "PACKAGE_VERSION" %s",
get_cpu_str ());
serv->p_nctcp (serv, nick, outbuf);
}
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/dcc.c xchat-wdk/src/common/dcc.c
--- xchat-wdk.orig/src/common/dcc.c 2007-02-06 05:45:13 +0100
+++ xchat-wdk/src/common/dcc.c 2010-03-29 13:17:58 +0200
@@ -31,7 +31,6 @@
#include <time.h>
#include <errno.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <fcntl.h>
#define WANTSOCKET
@@ -1984,7 +1983,7 @@
/* now handle case-insensitive Filesystems: HFS+, FAT */
#ifdef WIN32
-#warning no win32 implementation - behaviour may be unreliable
+/* warning no win32 implementation - behaviour may be unreliable */
#else
/* this fstat() shouldn't really fail */
if ((dcc->fp == -1 ? stat (dcc->destfile_fs, &st_a) : fstat (dcc->fp, &st_a)) == -1)
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/identd.c xchat-wdk/src/common/identd.c
--- xchat-wdk.orig/src/common/identd.c 2004-05-24 15:47:58 +0200
+++ xchat-wdk/src/common/identd.c 2010-03-29 18:04:55 +0200
@@ -1,6 +1,10 @@
/* simple identd server for xchat under win32 */
+#include "inet.h"
+#include "xchat.h"
+#include "xchatc.h"
+
static int identd_is_running = FALSE;
@@ -75,7 +79,7 @@
return 0;
}
-static void
+void
identd_start (char *username)
{
DWORD tid;
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/identd.h xchat-wdk/src/common/identd.h
--- xchat-wdk.orig/src/common/identd.h 1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/common/identd.h 2010-03-29 18:05:16 +0200
@@ -0,0 +1 @@
+void identd_start (char *username);
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/ignore.c xchat-wdk/src/common/ignore.c
--- xchat-wdk.orig/src/common/ignore.c 2006-04-15 09:00:39 +0200
+++ xchat-wdk/src/common/ignore.c 2010-03-29 12:58:18 +0200
@@ -19,7 +19,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/inbound.c xchat-wdk/src/common/inbound.c
--- xchat-wdk.orig/src/common/inbound.c 2008-03-19 05:28:57 +0100
+++ xchat-wdk/src/common/inbound.c 2010-03-29 12:58:16 +0200
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
-#include <unistd.h>
#include <time.h>
#define WANTARPA
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/inet.h xchat-wdk/src/common/inet.h
--- xchat-wdk.orig/src/common/inet.h 2005-09-03 12:57:48 +0200
+++ xchat-wdk/src/common/inet.h 2010-03-29 15:36:39 +0200
@@ -24,9 +24,8 @@
#ifdef USE_IPV6
#include <winsock2.h>
#include <ws2tcpip.h>
-#include <tpipv6.h>
#else
-#include <winsock.h>
+#include <winsock2.h>
#endif
#define set_blocking(sok) { \
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/msproxy.c xchat-wdk/src/common/msproxy.c
--- xchat-wdk.orig/src/common/msproxy.c 2006-04-16 17:32:17 +0200
+++ xchat-wdk/src/common/msproxy.c 2010-03-29 12:58:13 +0200
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include <fcntl.h>
#define WANTSOCKET
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/network.c xchat-wdk/src/common/network.c
--- xchat-wdk.orig/src/common/network.c 2006-04-16 10:11:26 +0200
+++ xchat-wdk/src/common/network.c 2010-03-29 12:58:40 +0200
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <unistd.h>
#include <glib.h>
#include "../../config.h" /* grab USE_IPV6 and LOOKUPD defines */
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/notify.c xchat-wdk/src/common/notify.c
--- xchat-wdk.orig/src/common/notify.c 2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/common/notify.c 2010-03-29 12:58:37 +0200
@@ -22,7 +22,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <unistd.h>
#include <time.h>
#include "xchat.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/outbound.c xchat-wdk/src/common/outbound.c
--- xchat-wdk.orig/src/common/outbound.c 2009-01-02 06:56:12 +0100
+++ xchat-wdk/src/common/outbound.c 2010-03-29 12:58:34 +0200
@@ -32,7 +32,6 @@
#include <sys/wait.h>
#endif
-#include <unistd.h>
#include <time.h>
#include <signal.h>
#include <sys/stat.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/proto-irc.c xchat-wdk/src/common/proto-irc.c
--- xchat-wdk.orig/src/common/proto-irc.c 2008-05-25 07:36:25 +0200
+++ xchat-wdk/src/common/proto-irc.c 2010-03-29 12:58:59 +0200
@@ -18,7 +18,6 @@
/* IRC RFC1459(+commonly used extensions) protocol implementation */
-#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/server.c xchat-wdk/src/common/server.c
--- xchat-wdk.orig/src/common/server.c 2008-02-17 09:54:55 +0100
+++ xchat-wdk/src/common/server.c 2010-03-29 17:36:30 +0200
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
@@ -67,7 +66,7 @@
#endif
#ifdef WIN32
-#include "identd.c"
+#include "identd.h"
#endif
#ifdef USE_OPENSSL
@@ -838,6 +837,7 @@
fe_set_throttle (serv);
}
+/* this doesn't really work so just disable it and use the failsafe method
#ifdef WIN32
static int
@@ -859,11 +859,11 @@
}
}
-#else
+#else*/
#define waitline2(source,buf,size) waitline(serv->childread,buf,size,0)
-#endif
+/*#endif*/
/* connect() successed */
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/servlist.c xchat-wdk/src/common/servlist.c
--- xchat-wdk.orig/src/common/servlist.c 2009-10-25 10:21:58 +0100
+++ xchat-wdk/src/common/servlist.c 2010-03-29 12:58:54 +0200
@@ -21,7 +21,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include "xchat.h"
#include <glib/ghash.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/ssl.c xchat-wdk/src/common/ssl.c
--- xchat-wdk.orig/src/common/ssl.c 2007-03-28 10:35:06 +0200
+++ xchat-wdk/src/common/ssl.c 2010-03-31 10:48:05 +0200
@@ -17,6 +17,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+/*#define _WS2DEF_
+#define _WINSOCK2API_
+#define _WS2TCPIP_H_*/
+#include <winsock2.h>
#include <openssl/ssl.h> /* SSL_() */
#include <openssl/err.h> /* ERR_() */
#include <time.h> /* asctime() */
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/text.c xchat-wdk/src/common/text.c
--- xchat-wdk.orig/src/common/text.c 2009-12-31 03:19:50 +0100
+++ xchat-wdk/src/common/text.c 2010-04-18 17:37:08 +0200
@@ -19,13 +19,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
#include <ctype.h>
#include <time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/mman.h>
#include "xchat.h"
#include <glib/ghash.h>
@@ -274,6 +272,8 @@
char *map, *end_map;
struct stat statbuf;
const char *begin, *eol;
+
+ HANDLE hFile, hMapFile;
if (sess->text_scrollback == SET_DEFAULT)
{
@@ -296,9 +296,32 @@
if (fstat (fh, &statbuf) < 0)
return;
- map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0);
- if (map == MAP_FAILED)
+ /* from http://osdir.com/ml/guile-devel-gnu/2009-04/msg00008.html */
+
+ hFile = (HANDLE)_get_osfhandle(fh);
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ return;
+ }
+
+ /* Create mapping object */
+ hMapFile = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
+ if (hMapFile == INVALID_HANDLE_VALUE)
+ {
return;
+ }
+
+ /* Select which portions of the file we need (entire file) */
+ map = (char *)MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0);
+
+ if (map == NULL)
+ {
+ CloseHandle(hMapFile);
+ return;
+ }
+ /*map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0);
+ if (map == MAP_FAILED)
+ return;*/
end_map = map + statbuf.st_size;
@@ -349,7 +372,9 @@
/*EMIT_SIGNAL (XP_TE_GENMSG, sess, "*", buf, NULL, NULL, NULL, 0);*/
}
- munmap (map, statbuf.st_size);
+ /* munmap (map, statbuf.st_size); */
+ CloseHandle(hMapFile);
+ CloseHandle(hFile);
close (fh);
}
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/util.c xchat-wdk/src/common/util.c
--- xchat-wdk.orig/src/common/util.c 2008-02-07 02:50:37 +0100
+++ xchat-wdk/src/common/util.c 2010-03-30 03:24:31 +0200
@@ -17,10 +17,11 @@
*/
#define __APPLE_API_STRICT_CONFORMANCE
+#define _WINSOCK2API_
+#define _WS2TCPIP_H_
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
-#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -35,7 +36,7 @@
#include <sys/utsname.h>
#endif
#include <fcntl.h>
-#include <dirent.h>
+#include "dirent.h"
#include <errno.h>
#include "xchat.h"
#include "xchatc.h"
@@ -54,9 +55,11 @@
#include <socks.h>
#endif
+#ifndef ENABLE_NLS
#ifndef HAVE_SNPRINTF
#define snprintf g_snprintf
#endif
+#endif
#ifdef USE_DEBUG
@@ -631,22 +634,32 @@
OSVERSIONINFO osvi;
SYSTEM_INFO si;
double mhz;
+ int cpu_arch;
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
GetVersionEx (&osvi);
GetSystemInfo (&si);
+ if (si.wProcessorArchitecture == 9)
+ {
+ cpu_arch = 64;
+ }
+ else
+ {
+ cpu_arch = 86;
+ }
+
mhz = get_mhz ();
if (mhz)
{
double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz;
const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz";
- sprintf (verbuf, "Windows %ld.%ld [i%d86/%.2f%s]",
- osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel,
+ sprintf (verbuf, "Windows %ld.%ld [x%d/%.2f%s]",
+ osvi.dwMajorVersion, osvi.dwMinorVersion, cpu_arch,
cpuspeed, cpuspeedstr);
} else
- sprintf (verbuf, "Windows %ld.%ld [i%d86]",
- osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel);
+ sprintf (verbuf, "Windows %ld.%ld [x%d]",
+ osvi.dwMajorVersion, osvi.dwMinorVersion, cpu_arch);
return verbuf;
}
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/xchat.c xchat-wdk/src/common/xchat.c
--- xchat-wdk.orig/src/common/xchat.c 2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/common/xchat.c 2010-03-29 12:59:15 +0200
@@ -22,7 +22,6 @@
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#define WANTSOCKET
#include "inet.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/common/xchat.h xchat-wdk/src/common/xchat.h
--- xchat-wdk.orig/src/common/xchat.h 2008-08-29 12:59:11 +0200
+++ xchat-wdk/src/common/xchat.h 2010-03-30 03:24:19 +0200
@@ -12,12 +12,14 @@
#include "history.h"
+#ifndef ENABLE_NLS
#ifndef HAVE_SNPRINTF
#define snprintf g_snprintf
#endif
#ifndef HAVE_VSNPRINTF
-#define vsnprintf g_vsnprintf
+#define vsnprintf _vsnprintf
+#endif
#endif
#ifdef USE_DEBUG
@@ -58,7 +60,7 @@
#ifdef WIN32 /* for win32 */
#define OFLAGS O_BINARY
-#define sleep(t) _sleep(t*1000)
+#define sleep(t) Sleep(t*1000)
#include <direct.h>
#define F_OK 0
#define X_OK 1
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/about.c xchat-wdk/src/fe-gtk/about.c
--- xchat-wdk.orig/src/fe-gtk/about.c 2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/fe-gtk/about.c 2010-04-02 10:27:10 +0200
@@ -119,7 +119,7 @@
"%s\n\n"
#ifdef WIN32
/* leave this message to avoid time wasting bug reports! */
- "This version is unofficial and comes with no support.\n\n"
+ "This version is unofficial and\ncomes with no support.\n\n"
#endif
"%s\n"
"<b>Charset</b>: %s "
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/banlist.c xchat-wdk/src/fe-gtk/banlist.c
--- xchat-wdk.orig/src/fe-gtk/banlist.c 2008-09-01 11:28:58 +0200
+++ xchat-wdk/src/fe-gtk/banlist.c 2010-03-29 12:59:40 +0200
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
#include <time.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/chanlist.c xchat-wdk/src/fe-gtk/chanlist.c
--- xchat-wdk.orig/src/fe-gtk/chanlist.c 2008-02-24 04:46:02 +0100
+++ xchat-wdk/src/fe-gtk/chanlist.c 2010-03-29 12:59:37 +0200
@@ -19,7 +19,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
#include <time.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/editlist.c xchat-wdk/src/fe-gtk/editlist.c
--- xchat-wdk.orig/src/fe-gtk/editlist.c 2006-03-13 09:33:45 +0100
+++ xchat-wdk/src/fe-gtk/editlist.c 2010-03-29 12:59:34 +0200
@@ -19,7 +19,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/fe-gtk.c xchat-wdk/src/fe-gtk/fe-gtk.c
--- xchat-wdk.orig/src/fe-gtk/fe-gtk.c 2008-02-29 03:19:00 +0100
+++ xchat-wdk/src/fe-gtk/fe-gtk.c 2010-03-30 04:22:55 +0200
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include "fe-gtk.h"
@@ -34,6 +33,8 @@
#include <gtk/gtkmessagedialog.h>
#include <gtk/gtkversion.h>
+#include <gdk/gdkwin32.h>
+
#include "../common/xchat.h"
#include "../common/fe.h"
#include "../common/util.h"
@@ -41,6 +42,7 @@
#include "../common/cfgfiles.h"
#include "../common/xchatc.h"
#include "../common/plugin.h"
+#include "../common/server.h"
#include "gtkutil.h"
#include "maingui.h"
#include "pixmaps.h"
@@ -351,6 +353,7 @@
static int
fe_idle (gpointer data)
{
+ /* disable tray icon
session *sess = sess_list->data;
plugin_add (sess, NULL, NULL, tray_plugin_init, tray_plugin_deinit, NULL, FALSE);
@@ -358,7 +361,7 @@
if (arg_minimize == 1)
gtk_window_iconify (GTK_WINDOW (sess->gui->window));
else if (arg_minimize == 2)
- tray_toggle_visibility (FALSE);
+ tray_toggle_visibility (FALSE);*/
return 0;
}
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/fe-gtk.h xchat-wdk/src/fe-gtk/fe-gtk.h
--- xchat-wdk.orig/src/fe-gtk/fe-gtk.h 2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/fe-gtk/fe-gtk.h 2010-03-29 17:52:49 +0200
@@ -4,7 +4,7 @@
/* If you're compiling this for Windows, your release is un-official
* and not condoned. Please don't use the XChat name. Call it YChat
* or make up your own name! */
-#define DISPLAY_NAME "YChat"
+#define DISPLAY_NAME "XChat-WDK"
#else
#define DISPLAY_NAME "XChat"
#endif
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/fkeys.c xchat-wdk/src/fe-gtk/fkeys.c
--- xchat-wdk.orig/src/fe-gtk/fkeys.c 2008-02-24 06:09:34 +0100
+++ xchat-wdk/src/fe-gtk/fkeys.c 2010-03-29 12:59:56 +0200
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <ctype.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/gtkutil.c xchat-wdk/src/fe-gtk/gtkutil.c
--- xchat-wdk.orig/src/fe-gtk/gtkutil.c 2009-07-18 14:38:10 +0200
+++ xchat-wdk/src/fe-gtk/gtkutil.c 2010-03-29 12:59:54 +0200
@@ -22,7 +22,6 @@
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <fcntl.h>
#include "fe-gtk.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/joind.c xchat-wdk/src/fe-gtk/joind.c
--- xchat-wdk.orig/src/fe-gtk/joind.c 2006-12-26 05:56:55 +0100
+++ xchat-wdk/src/fe-gtk/joind.c 2010-03-29 13:00:16 +0200
@@ -9,7 +9,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <string.h>
#include <stdio.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/maingui.c xchat-wdk/src/fe-gtk/maingui.c
--- xchat-wdk.orig/src/fe-gtk/maingui.c 2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/fe-gtk/maingui.c 2010-03-30 12:57:53 +0200
@@ -1320,12 +1320,12 @@
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1),
GTK_BUTTONBOX_END);
- if (minimize_button)
+ /*if (minimize_button)
{
button = gtk_button_new_with_mnemonic (_("_Minimize to Tray"));
gtk_widget_show (button);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 1);
- }
+ }*/
button = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (button);
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/menu.c xchat-wdk/src/fe-gtk/menu.c
--- xchat-wdk.orig/src/fe-gtk/menu.c 2008-06-10 14:05:00 +0200
+++ xchat-wdk/src/fe-gtk/menu.c 2010-03-29 13:00:13 +0200
@@ -22,7 +22,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
-#include <unistd.h>
#ifdef WIN32
#include <windows.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/palette.c xchat-wdk/src/fe-gtk/palette.c
--- xchat-wdk.orig/src/fe-gtk/palette.c 2006-03-13 09:33:45 +0100
+++ xchat-wdk/src/fe-gtk/palette.c 2010-03-29 13:00:11 +0200
@@ -20,7 +20,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/src/fe-gtk/plugin-tray.c
--- xchat-wdk.orig/src/fe-gtk/plugin-tray.c 2008-08-29 12:59:11 +0200
+++ xchat-wdk/src/fe-gtk/plugin-tray.c 2010-03-31 12:25:02 +0200
@@ -1,7 +1,6 @@
/* Copyright (C) 2006-2007 Peter Zelezny. */
#include <string.h>
-#include <unistd.h>
#include "../common/xchat-plugin.h"
#include "../common/xchat.h"
#include "../common/xchatc.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/rawlog.c xchat-wdk/src/fe-gtk/rawlog.c
--- xchat-wdk.orig/src/fe-gtk/rawlog.c 2008-02-24 06:09:34 +0100
+++ xchat-wdk/src/fe-gtk/rawlog.c 2010-03-29 13:00:30 +0200
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
-#include <unistd.h>
#include <stdlib.h>
#include "fe-gtk.h"
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe-gtk/setup.c
--- xchat-wdk.orig/src/fe-gtk/setup.c 2008-02-08 10:04:45 +0100
+++ xchat-wdk/src/fe-gtk/setup.c 2010-04-02 08:34:37 +0200
@@ -332,11 +332,15 @@
#ifndef WIN32
{ST_3OGGLE, N_("Show tray balloons on:"), 0, 0, (void *)balloonlist, 0},
#endif
- {ST_3OGGLE, N_("Blink tray icon on:"), 0, 0, (void *)trayblinklist, 0},
- {ST_3OGGLE, N_("Blink task bar on:"), 0, 0, (void *)taskbarlist, 0},
+ /* we don't use the xchat plugin-tray */
+ /* {ST_3OGGLE, N_("Blink tray icon on:"), 0, 0, (void *)trayblinklist, 0}, */
+
+ /* this causes a crash for some reason, disable it */
+ /* {ST_3OGGLE, N_("Blink task bar on:"), 0, 0, (void *)taskbarlist, 0}, */
+
{ST_3OGGLE, N_("Make a beep sound on:"), 0, 0, (void *)beeplist, 0},
- {ST_TOGGLE, N_("Enable system tray icon"), P_OFFINTNL(gui_tray), 0, 0, 0},
+ /* {ST_TOGGLE, N_("Enable system tray icon"), P_OFFINTNL(gui_tray), 0, 0, 0}, */
{ST_HEADER, N_("Highlighted Messages"),0,0,0},
{ST_LABEL, N_("Highlighted messages are ones where your nickname is mentioned, but also:"), 0, 0, 0, 1},
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c xchat-wdk/src/fe-gtk/sexy-spell-entry.c
--- xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c 2006-07-17 07:51:02 +0200
+++ xchat-wdk/src/fe-gtk/sexy-spell-entry.c 2010-03-29 14:42:33 +0200
@@ -31,6 +31,20 @@
/*#include "gtkspell-iso-codes.h"
#include "sexy-marshal.h"*/
+/* workaround for ssize_t in VS
+ from krb/include/win-mac.h */
+#ifndef SSIZE_T_DEFINED
+#ifdef ssize_t
+#undef ssize_t
+#endif
+#ifdef _WIN64
+typedef __int64 ssize_t;
+#else
+typedef _W64 int ssize_t;
+#endif
+#define SSIZE_T_DEFINED
+#endif
+
/*
* Bunch of poop to make enchant into a runtime dependency rather than a
* compile-time dependency. This makes it so I don't have to hear the
diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/xtext.c xchat-wdk/src/fe-gtk/xtext.c
--- xchat-wdk.orig/src/fe-gtk/xtext.c 2008-08-29 13:24:17 +0200
+++ xchat-wdk/src/fe-gtk/xtext.c 2010-03-29 13:00:27 +0200
@@ -42,7 +42,6 @@
#include <ctype.h>
#include <stdlib.h>
#include <time.h>
-#include <unistd.h>
#include <gtk/gtkmain.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkselection.h>