#if PLATFORM_UNIX
#include <unistd.h>
#include <sys/time.h>
+#include <sys/stat.h>
#include <assert.h>
typedef long long __int64;
typedef __int64 LARGE_INTEGER;
if (homedir == NULL)
homedir = "."; // oh well.
+#if (defined(__APPLE__) && defined(__MACH__))
+ const char *PREFPATHNAME = "Library/Application Support/Lugaru";
+#else
const char *PREFPATHNAME = ".lugaru";
+#endif
size_t len = strlen(homedir) + strlen(PREFPATHNAME) + 2;
prefpath = new char[len];
snprintf(prefpath, len, "%s/%s", homedir, PREFPATHNAME);