diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-10-06 14:29:45 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2010-10-06 14:29:45 +0200 |
commit | 11a9adb19fbfbf265f37edba893a810ea50959a1 (patch) | |
tree | b9ce968f3a50254604ca5a38f699d4e3bc5f12bc | |
parent | b0e8ed68bae10f813e0f2b74a7c8da8fcb9f6f4f (diff) |
be consistent about ssize_t
-rw-r--r-- | ext/enchant-wdk/src/config.h | 20 | ||||
-rw-r--r-- | src/fe-gtk/typedef.h | 11 | ||||
-rw-r--r-- | xchat-wdk.patch | 20 |
3 files changed, 26 insertions, 25 deletions
diff --git a/ext/enchant-wdk/src/config.h b/ext/enchant-wdk/src/config.h index 9b569554..d91c69c6 100644 --- a/ext/enchant-wdk/src/config.h +++ b/ext/enchant-wdk/src/config.h @@ -1,13 +1,15 @@ -/* - * Hand tailored config.h for windows. - */ +#include <sys/types.h> -/* define ssize_t to int if <sys/types.h> doesn't define.*/ -typedef int ssize_t; -/* #undef ssize_t */ - -#if defined(_MSC_VER) -#pragma warning(disable: 4996) /* The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name. */ +#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 #define ENCHANT_VERSION_STRING "1.6.0" diff --git a/src/fe-gtk/typedef.h b/src/fe-gtk/typedef.h new file mode 100644 index 00000000..b20612ea --- /dev/null +++ b/src/fe-gtk/typedef.h @@ -0,0 +1,11 @@ +#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 diff --git a/xchat-wdk.patch b/xchat-wdk.patch index 5971ec96..0dbb50d4 100644 --- a/xchat-wdk.patch +++ b/xchat-wdk.patch @@ -1590,29 +1590,17 @@ diff -ruN --strip-trailing-cr xchat-wdk.orig/src/fe-gtk/setup.c xchat-wdk/src/fe 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 05:51:02 +0000 -+++ xchat-wdk/src/fe-gtk/sexy-spell-entry.c 2010-10-05 22:10:24 +0000 -@@ -31,6 +31,20 @@ ++++ xchat-wdk/src/fe-gtk/sexy-spell-entry.c 2010-10-06 12:23:23 +0000 +@@ -31,6 +31,8 @@ /*#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 ++#include "typedef.h" + /* * 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 -@@ -134,12 +148,10 @@ +@@ -134,12 +136,10 @@ GModule *enchant; gpointer funcptr; |