initial patches for linux compatibility

This commit is contained in:
Berke Viktor
2011-12-11 17:34:02 +01:00
parent 2012320d0e
commit 132ef6cb50
44 changed files with 304 additions and 59 deletions

View File

@@ -27,17 +27,21 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef WIN32
#include <sys/timeb.h>
#include <process.h>
#include <io.h>
#include "dirent.h"
#else
#include <sys/types.h>
#include <unistd.h>
#include <pwd.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <dirent.h>
#endif
#include <fcntl.h>
#include "dirent.h"
#include <errno.h>
#include "xchat.h"
#include "xchatc.h"
@@ -1848,3 +1852,37 @@ canonalize_key (char *key)
}
}
}
int
portable_mode ()
{
#ifdef WIN32
if ((_access( "portable-mode", 0 )) != -1)
{
return 1;
}
else
{
return 0;
}
#else
return 0;
#endif
}
int
xtray_mode ()
{
#ifdef WIN32
if ((_access( "plugins/xtray.dll", 0 )) != -1)
{
return 1;
}
else
{
return 0;
}
#else
return 0;
#endif
}