summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dns/dns.c1
-rw-r--r--plugins/dns/thread.c1
-rw-r--r--plugins/exec/exec.c2
-rw-r--r--plugins/lua/lua-xp.vcxproj4
-rw-r--r--plugins/lua/lua.c18
-rw-r--r--plugins/lua/lua.vcxproj4
-rw-r--r--plugins/python/python.c1
-rw-r--r--plugins/tcl/tclplugin.c1
-rw-r--r--plugins/upd/upd-xp.vcxproj4
-rw-r--r--plugins/upd/upd.c2
-rw-r--r--plugins/upd/upd.vcxproj4
11 files changed, 25 insertions, 17 deletions
diff --git a/plugins/dns/dns.c b/plugins/dns/dns.c
index cd64c4b5..9e359805 100644
--- a/plugins/dns/dns.c
+++ b/plugins/dns/dns.c
@@ -37,6 +37,7 @@
 #else
 #include <winsock2.h>
 #endif
+#include <io.h>
 #else
 #include <unistd.h>
 #include <netdb.h>
diff --git a/plugins/dns/thread.c b/plugins/dns/thread.c
index 02b17cfb..d0347130 100644
--- a/plugins/dns/thread.c
+++ b/plugins/dns/thread.c
@@ -1,3 +1,4 @@
+#include <io.h>
 #include <fcntl.h>
 #include "thread.h"
 
diff --git a/plugins/exec/exec.c b/plugins/exec/exec.c
index 483b8e7f..790278a2 100644
--- a/plugins/exec/exec.c
+++ b/plugins/exec/exec.c
@@ -51,6 +51,8 @@ run_command (char *word[], char *word_eol[], void *userdata)
 	secattr.nLength = sizeof (secattr);
 	secattr.bInheritHandle = TRUE;
 
+	timeElapsed = 0.0;
+
 	if (strlen (word[2]) > 0)
 	{
 		strcpy (commandLine, "cmd.exe /c ");
diff --git a/plugins/lua/lua-xp.vcxproj b/plugins/lua/lua-xp.vcxproj
index da2c749e..ba32e574 100644
--- a/plugins/lua/lua-xp.vcxproj
+++ b/plugins/lua/lua-xp.vcxproj
@@ -63,7 +63,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>

       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

@@ -82,7 +82,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>

       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

diff --git a/plugins/lua/lua.c b/plugins/lua/lua.c
index fb624e47..cd237c24 100644
--- a/plugins/lua/lua.c
+++ b/plugins/lua/lua.c
@@ -46,9 +46,12 @@
 #include <errno.h>
 #include <ctype.h>
 
+#include <glib.h>
+
 #ifdef _WIN32
 #include <direct.h>	/* for getcwd */
 #include "../../src/dirent/dirent-win32.h"
+#include "../../src/common/typedef.h"
 #endif
 
 #if !( defined(_WIN32) || defined(LXC_XCHAT_GETTEXT) )
@@ -429,7 +432,7 @@ lxc_autoload_from_path(const char *path)
 						strerror(errno));
 					break;
 				}
-				sprintf(file, "%s/%s", path, ent->d_name);
+				sprintf(file, "%s" G_DIR_SEPARATOR_S "%s", path, ent->d_name);
 				(void)lxc_load_file((const char *)file);
 				free(file);
 			}
@@ -510,22 +513,19 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
 
  	len = strlen(word[2]);
 	if (len > 4 && strcasecmp (".lua", word[2] + len - 4) == 0) {
-#ifdef WIN32
-		if (strrchr(word[2], '\\') != NULL)
-#else
-		if (strrchr(word[2], '/') != NULL)
-#endif
+		if (strrchr(word[2], G_DIR_SEPARATOR) != NULL)
 			strncpy(file, word[2], PATH_MAX);
-		else {
+		else
+		{
 			if (stat(word[2], st) == 0)
 			{
 				xdir = getcwd (buf, PATH_MAX);
-				snprintf (file, PATH_MAX, "%s/%s", xdir, word[2]);
+				snprintf (file, PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s", xdir, word[2]);
 			}
 			else
 			{
 				xdir = hexchat_get_info (ph, "hexchatdirfs");
-				snprintf (file, PATH_MAX, "%s/addons/%s", xdir, word[2]);
+				snprintf (file, PATH_MAX, "%s" G_DIR_SEPARATOR_S "addons" G_DIR_SEPARATOR_S "%s", xdir, word[2]);
 			}
 		}
 
diff --git a/plugins/lua/lua.vcxproj b/plugins/lua/lua.vcxproj
index c4ce5e2f..a49fb5a9 100644
--- a/plugins/lua/lua.vcxproj
+++ b/plugins/lua/lua.vcxproj
@@ -60,7 +60,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>

       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

@@ -79,7 +79,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>

       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

diff --git a/plugins/python/python.c b/plugins/python/python.c
index 2ef531c5..efe57480 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -57,6 +57,7 @@
 #include <sys/types.h>
 
 #ifdef WIN32
+#include <direct.h>
 #include "../../src/dirent/dirent-win32.h"
 #include "../../config-win32.h"
 #else
diff --git a/plugins/tcl/tclplugin.c b/plugins/tcl/tclplugin.c
index 86e4fc8e..6ec89137 100644
--- a/plugins/tcl/tclplugin.c
+++ b/plugins/tcl/tclplugin.c
@@ -30,6 +30,7 @@ static char RCSID[] = "$Id: tclplugin.c,v 1.65 2012/07/26 20:02:12 mooooooo Exp
 
 #ifdef WIN32
 #include <windows.h>
+#include "../../src/common/typedef.h"
 #define bzero(mem, sz) memset((mem), 0, (sz))
 #define bcopy(src, dest, count) memmove((dest), (src), (count))
 #else
diff --git a/plugins/upd/upd-xp.vcxproj b/plugins/upd/upd-xp.vcxproj
index dbb68499..0072580b 100644
--- a/plugins/upd/upd-xp.vcxproj
+++ b/plugins/upd/upd-xp.vcxproj
@@ -64,7 +64,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

-      <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

@@ -85,7 +85,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

-      <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

diff --git a/plugins/upd/upd.c b/plugins/upd/upd.c
index b986b96e..c299c4e6 100644
--- a/plugins/upd/upd.c
+++ b/plugins/upd/upd.c
@@ -23,6 +23,8 @@
 #include <windows.h>
 #include <wininet.h>
 
+#include <glib.h>
+
 #include "hexchat-plugin.h"
 
 #define DEFAULT_DELAY 10	/* 10 seconds */
diff --git a/plugins/upd/upd.vcxproj b/plugins/upd/upd.vcxproj
index a330e864..355f95c0 100644
--- a/plugins/upd/upd.vcxproj
+++ b/plugins/upd/upd.vcxproj
@@ -61,7 +61,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

-      <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>

@@ -82,7 +82,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>

       <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;UPD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <MultiProcessorCompilation>true</MultiProcessorCompilation>

-      <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

     </ClCompile>

     <Link>

       <SubSystem>Windows</SubSystem>