1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
/*******************************************************************************
* syspovconfig.h
*
* This file contains most unix-specific defines for compiling the VFE.
*
* ---------------------------------------------------------------------------
* Persistence of Vision Ray Tracer ('POV-Ray') version 3.7.
* Copyright 1991-2013 Persistence of Vision Raytracer Pty. Ltd.
*
* POV-Ray is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* POV-Ray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------------
* POV-Ray is based on the popular DKB raytracer version 2.12.
* DKBTrace was originally written by David K. Buck.
* DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
* ---------------------------------------------------------------------------
* $File: //depot/povray/smp/vfe/unix/syspovconfig.h $
* $Revision: #17 $
* $Change: 6133 $
* $DateTime: 2013/11/25 15:28:53 $
* $Author: clipka $
*******************************************************************************/
#ifndef __SYSPOVCONFIG_H__
#define __SYSPOVCONFIG_H__
#define _FILE_OFFSET_BITS 64
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# error "!!!!! config.h is required !!!!!"
#endif
#include <algorithm>
#include <stdarg.h>
#include <math.h>
#include "../vfeconf.h"
using std::max;
using std::min;
#ifndef STD_TYPES_DECLARED
#define STD_TYPES_DECLARED
// the following types are used extensively throughout the POV source and hence are
// included and named here for reasons of clarity and convenience.
#include <exception>
#include <stdexcept>
#include <string>
#include <vector>
#include <list>
#include <boost/version.hpp>
#if BOOST_VERSION < 106500
// Pulling in smart pointers is easy with Boost versions prior to 1.65.0, with the
// `boost/tr1/*.hpp` set of headers simply pulling in whatever is available (C++11, TR1 or
// boost's own implementation) and making it available in the `std::tr1` namespace.
#include <boost/tr1/memory.hpp>
#define POV_TR1_NAMESPACE std::tr1
#else
// With `boost/tr1/*.hpp` unavailable, we're currently blindly relying on the compiler to
// be compliant with C++11.
#include <memory>
#define POV_TR1_NAMESPACE std
#endif
// when we say 'string' we mean std::string
using std::string;
// and vector is a std::vector
using std::vector;
// yup, list too
using std::list;
// runtime_error is the base of our Exception class, plus is referred
// to in a few other places.
using std::runtime_error;
// these may actually be the boost implementations, depending on what boost/tr1/memory.hpp has pulled in
// (NOTE: If you're running into a compile error here, you're probably trying to compile POV-Ray
// with Boost 1.65.0 or later and a non-C++11-compliant compiler. We currently do not support such a
// combination.)
using POV_TR1_NAMESPACE::shared_ptr;
using POV_TR1_NAMESPACE::weak_ptr;
#endif // STD_POV_TYPES_DECLARED
// After Stroustrop in _The C++ Programming Language, 3rd Ed_ p. 88
#ifndef NULL
const int NULL=0;
#endif
#define DELETE_FILE(name) unlink(name)
#if defined (PATH_MAX)
# define FILE_NAME_LENGTH PATH_MAX
#elif defined (_POSIX_PATH_MAX)
# define FILE_NAME_LENGTH _POSIX_PATH_MAX
#else
# define FILE_NAME_LENGTH 200
#endif
#define MAX_PATH FILE_NAME_LENGTH // FIXME: remove later
#define DEFAULT_OUTPUT_FORMAT kPOVList_FileType_PNG
#define DEFAULT_DISPLAY_GAMMA_TYPE kPOVList_GammaType_SRGB
#define DEFAULT_DISPLAY_GAMMA 2.2
#define DEFAULT_FILE_GAMMA_TYPE kPOVList_GammaType_SRGB
#define DEFAULT_FILE_GAMMA 2.2
#define METADATA_PLATFORM_STRING BUILD_ARCH
#define METADATA_COMPILER_STRING COMPILER_VERSION
// Pull in additional settings depending on Unix flavor
#if defined(_AIX)
// IBM AIX detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error IBM AIX detected, but not explicitly supported yet; proceed at your own risk.
#include "syspovconfig_posix.h"
#elif defined(__hpux)
// Hewlett-Packard HP-UX detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Hewlett-Packard HP-UX detected, but not explicitly supported yet; proceed at your own risk.
#include "syspovconfig_posix.h"
#elif defined(__linux__)
// GNU/Linux detected.
#include "syspovconfig_linux.h"
#elif defined(__APPLE__) && defined(__MACH__)
// Apple Mac OS X detected.
#include "syspovconfig_osx.h"
#elif defined(__sun) && defined(__SVR4)
// Sun/Oracle Solaris detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Sun/Oracle Solaris detected, but not explicitly supported yet; proceed at your own risk.
#include "syspovconfig_posix.h"
#elif defined(__CYGWIN__)
// Cygwin detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Cygwin detected, but not explicitly supported yet; proceed at your own risk.
#include "syspovconfig_posix.h"
#elif defined(__unix__)
// Some Unix other than the above detected.
#include <sys/param.h>
#if defined(BSD) || defined(__FreeBSD_kernel__)
// BSD-style Unix detected.
#include "syspovconfig_bsd.h"
#else
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Unix detected, but flavor not identified; proceed at your own risk.
#include "syspovconfig_posix.h"
#endif
#else
// Doesn't look like a Unix at all.
// Comment-out the following line to try with default POSIX settings.
#error No Unix detected; proceed at your own risk.
#include "syspovconfig_posix.h"
#endif
#if defined(_AIX)
// IBM AIX detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error IBM AIX detected, but not explicitly supported yet; proceed at your own risk.
#elif defined(__hpux)
// Hewlett-Packard HP-UX detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Hewlett-Packard HP-UX detected, but not explicitly supported yet; proceed at your own risk.
#elif defined(__linux__)
// GNU/Linux detected.
#elif defined(__APPLE__) && defined(__MACH__)
// Apple Mac OS X detected.
#include <unistd.h>
#define lseek64(handle,offset,whence) lseek(handle,offset,whence)
#elif defined(__sun) && defined(__SVR4)
// Sun/Oracle Solaris detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Sun/Oracle Solaris detected, but not explicitly supported yet; proceed at your own risk.
#elif defined(__CYGWIN__)
// Cygwin detected.
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Cygwin detected, but not explicitly supported yet; proceed at your own risk.
#elif defined(__unix__)
// Some Unix other than the above detected.
#include <sys/param.h>
#if defined(BSD) || defined(__FreeBSD_kernel__)
// BSD-style Unix detected.
//#error BSD-style Unix detected, but not explicitly supported yet; proceed at your own risk.
#else
// Not officially supported yet; comment-out the following line to try with default POSIX settings.
#error Unix detected, but flavor not identified; proceed at your own risk.
#endif
#else
// Doesn't look like a Unix at all.
// Comment-out the following line to try with default POSIX settings.
#error No Unix detected; proceed at your own risk.
#endif
#endif
|