CrystalSpace

Public API Reference

csutil/unix/csosdefs.h

00001 /*
00002     Copyright (C) 1998 by Jorrit Tyberghein
00003     Written by Andrew Zabolotny <[email protected]>
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 #include <stdarg.h>
00030 
00031 #ifndef F_OK
00032 #  define F_OK 0
00033 #endif
00034 #ifndef R_OK
00035 #  define R_OK 2
00036 #endif
00037 #ifndef W_OK
00038 #  define W_OK 4
00039 #endif
00040 
00041 #define CS_HAVE_POSIX_MMAP
00042 #define CS_USE_CUSTOM_ISDIR
00043 #define CS_PATH_DELIMITER ':'
00044 #define CS_PATH_SEPARATOR '/'
00045 
00046 #define CS_MKDIR(p) mkdir(p, 0755)
00047 
00048 #define CS_SOFTWARE_2D_DRIVER "crystalspace.graphics2d.x2d"
00049 #define CS_OPENGL_2D_DRIVER   "crystalspace.graphics2d.glx"
00050 #define CS_SOUND_DRIVER       "crystalspace.sound.driver.oss"
00051 #define CS_SNDSYS_DRIVER      "crystalspace.sndsys.software.driver.alsa"
00052 
00053 #if !defined(CS_STATIC_LINKED) && defined(CS_UNIX_PLUGIN_REQUIRES_MAIN)
00054 // Dummy main function required for plugin modules on some Unix platforms.
00055 // Implementing this function ensures that global constructors in plugin
00056 // modules are invoked.
00057 #define CS_IMPLEMENT_PLATFORM_PLUGIN \
00058 int main (int argc, char* argv[]) \
00059 { \
00060   (void)argc; (void)argv; \
00061   return 0; \
00062 }
00063 #endif // !CS_STATIC_LINKED && CS_UNIX_PLUGIN_REQUIRES_MAIN
00064 
00065 #endif // __CS_CSOSDEFS_H__

Generated for Crystal Space by doxygen 1.4.7