physfs_platforms.h
author Ryan C. Gordon <icculus@icculus.org>
Mon, 22 Oct 2012 23:40:52 -0400
branchstable-2.0
changeset 1306 bf155bd2127b
parent 1296 729ae74cee66
child 1314 305e3c4985d1
permissions -rw-r--r--
Use .tar.bz2 for "make dist" instead of .tar.gz Mercurial's tgz archiver is writing the full output path into the archive, causing things like 7-zip to uncompress it to "Users/icculus/projects/physfs-2.0.2.tar" instead of just "physfs-2.0.2.tar". It seems reasonable to believe everyone has .tar.bz2 support by now anyhow.

#ifndef _INCL_PHYSFS_PLATFORMS
#define _INCL_PHYSFS_PLATFORMS

#ifndef __PHYSICSFS_INTERNAL__
#error Do not include this header from your applications.
#endif

/*
 * These only define the platforms to determine which files in the platforms
 *  directory should be compiled. For example, technically BeOS can be called
 *  a "unix" system, but since it doesn't use unix.c, we don't define
 *  PHYSFS_PLATFORM_UNIX on that system.
 */

#if (defined __HAIKU__)
#  define PHYSFS_PLATFORM_HAIKU
#  define PHYSFS_PLATFORM_BEOS
#  define PHYSFS_PLATFORM_POSIX
#elif ((defined __BEOS__) || (defined __beos__))
#  define PHYSFS_PLATFORM_BEOS
#  define PHYSFS_PLATFORM_POSIX
#elif (defined _WIN32_WCE) || (defined _WIN64_WCE)
#  define PHYSFS_PLATFORM_POCKETPC
#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__))
#  define PHYSFS_PLATFORM_WINDOWS
#elif (defined OS2)
#  define PHYSFS_PLATFORM_OS2
#elif ((defined __MACH__) && (defined __APPLE__))
/* To check if iphone or not, we need to include this file */
# include <TargetConditionals.h> 
# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE))
#    define PHYSFS_PLATFORM_UNIX
#    define PHYSFS_PLATFORM_POSIX
#    define PHYSFS_NO_CDROM_SUPPORT
#  else
#    define PHYSFS_PLATFORM_MACOSX
#    define PHYSFS_PLATFORM_POSIX
#  endif
#elif defined(macintosh)
#  error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X.
#elif defined(unix) || defined(__unix__)
#  define PHYSFS_PLATFORM_UNIX
#  define PHYSFS_PLATFORM_POSIX
#else
#  error Unknown platform.
#endif

#endif  /* include-once blocker. */