|
|
/* $Id$ */
|
|
|
|
|
|
/** @file unix.cpp */
|
|
|
/** @file unix.cpp Implementation of Unix specific file handling. */
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "openttd.h"
|
|
|
#include "variables.h"
|
|
|
#include "textbuf_gui.h"
|
|
|
#include "functions.h"
|
|
|
#include "core/random_func.hpp"
|
|
|
|
|
|
#include "table/strings.h"
|
|
|
|
|
|
#include <dirent.h>
|
|
|
#include <unistd.h>
|
|
|
#include <sys/stat.h>
|
|
|
#include <time.h>
|
|
|
#include <signal.h>
|
|
|
|
|
|
#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__GLIBC__)
|
|
|
#define HAS_STATVFS
|
|
|
#endif
|
|
|
|
|
|
#ifdef HAS_STATVFS
|
|
|
#include <sys/statvfs.h>
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#ifdef __MORPHOS__
|
|
|
#include <exec/types.h>
|
|
|
ULONG __stack = (1024*1024)*2; // maybe not that much is needed actually ;)
|
|
|
|
|
|
/* The system supplied definition of SIG_IGN does not match */
|
|
|
#undef SIG_IGN
|
|
|
#define SIG_IGN (void (*)(int))1
|
|
|
#endif /* __MORPHOS__ */
|
|
|
|
|
|
#ifdef __AMIGA__
|
|
|
#warning add stack symbol to avoid that user needs to set stack manually (tokai)
|
|
|
// ULONG __stack =
|
|
|
#endif
|
|
|
|
|
|
#if defined(__APPLE__)
|
|
|
#if defined(WITH_SDL)
|
|
|
/*the mac implementation needs this file included in the same file as main() */
|
|
|
#include <SDL.h>
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
bool FiosIsRoot(const char *path)
|
|
|
{
|