File: syspovconfig.h

package info (click to toggle)
povray 1%3A3.7.0.0-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 105,460 kB
  • ctags: 115,319
  • sloc: cpp: 438,613; ansic: 118,761; sh: 37,706; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,283; cs: 879; awk: 590; perl: 245; xml: 95
file content (158 lines) | stat: -rw-r--r-- 5,497 bytes parent folder | download | duplicates (2)
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
/*******************************************************************************
 * 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: #15 $
 * $Change: 6129 $
 * $DateTime: 2013/11/25 11:09:30 $
 * $Author: clipka $
 *******************************************************************************/

#ifndef __SYSPOVCONFIG_H__
#define __SYSPOVCONFIG_H__

#define _FILE_OFFSET_BITS 64 // Required for some Unix flavors to get a 64-bit off_t type on 32-bit systems.

#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/shared_ptr.hpp>

// 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;

// C++0x has a shared_ptr, but we currently use the boost one.
using boost::shared_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

#endif