## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# csutil/unix/csosdefs.h

    00001 /*
    00002     Copyright (C) 1998 by Jorrit Tyberghein
    00003     Written by Andrew Zabolotny <bit@eltech.ru>
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public
    00016     License along with this library; if not, write to the Free
    00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00018 */
    00019
    00020 #ifndef __CS_CSOSDEFS_H__
    00021 #define __CS_CSOSDEFS_H__
    00022
    00023 #include <math.h>
    00024 #include <unistd.h>
    00025 #include <sys/types.h>
    00026 #include <sys/select.h>
    00027 #include <sys/stat.h>
    00028 #include <dirent.h>
    00029
    00030 #ifndef F_OK
    00031 #  define F_OK 0
    00032 #endif
    00033 #ifndef R_OK
    00034 #  define R_OK 2
    00035 #endif
    00036 #ifndef W_OK
    00037 #  define W_OK 4
    00038 #endif
    00039
    00040 #define CS_HAVE_POSIX_MMAP
    00041 #define CS_USE_CUSTOM_ISDIR
    00042 #define CS_PATH_DELIMITER ':'
    00043 #define CS_PATH_SEPARATOR '/'
    00044
    00045 #define CS_MKDIR(p) mkdir(p, 0755)
    00046
    00047 #define CS_SOFTWARE_2D_DRIVER "crystalspace.graphics2d.x2d"
    00048 #define CS_OPENGL_2D_DRIVER   "crystalspace.graphics2d.glx"
    00049 #define CS_SOUND_DRIVER       "crystalspace.sound.driver.oss"
    00050 #define CS_SNDSYS_DRIVER      "crystalspace.sndsys.software.driver.oss"
    00051
    00052 #if !defined(CS_STATIC_LINKED) && defined(CS_UNIX_PLUGIN_REQUIRES_MAIN)
    00053 // Dummy main function required for plugin modules on some Unix platforms.
    00054 // Implementing this function ensures that global constructors in plugin
    00055 // modules are invoked.
    00056 #define CS_IMPLEMENT_PLATFORM_PLUGIN \
    00057 int main (int argc, char* argv[]) \
    00058 { \
    00059   (void)argc; (void)argv; \
    00060   return 0; \
    00061 }
    00062 #endif // !CS_STATIC_LINKED && CS_UNIX_PLUGIN_REQUIRES_MAIN
    00063
    00064 #endif // __CS_CSOSDEFS_H__