mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
initial patches for linux compatibility
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user