]> git.saurik.com Git - apple/javascriptcore.git/blob - kjs/config.h
JavaScriptCore-466.1.6.tar.gz
[apple/javascriptcore.git] / kjs / config.h
1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21
22 #include <wtf/Platform.h>
23
24
25 #if PLATFORM(DARWIN)
26
27 #define HAVE_ERRNO_H 1
28 #define HAVE_MADV_DONTNEED 1
29 #define HAVE_MMAP 1
30 #define HAVE_MERGESORT 1
31 #define HAVE_SBRK 1
32 #define HAVE_STRINGS_H 1
33 #define HAVE_SYS_PARAM_H 1
34 #define HAVE_SYS_TIME_H 1
35 #define HAVE_SYS_TIMEB_H 1
36
37 #elif PLATFORM(WIN_OS)
38
39 // If we don't define these, they get defined in windef.h.
40 // We want to use std::min and std::max
41 #define max max
42 #define min min
43
44 #if !COMPILER(MSVC7)
45 // We need to define this before the first #include of stdlib.h or it won't contain rand_s.
46 #ifndef _CRT_RAND_S
47 #define _CRT_RAND_S
48 #endif
49 #endif
50
51 #define HAVE_FLOAT_H 1
52 #define HAVE_SYS_TIMEB_H 1
53 #define HAVE_VIRTUALALLOC 1
54
55 #else
56
57 /* FIXME: is this actually used or do other platforms generate their own config.h? */
58
59 #define HAVE_ERRNO_H 1
60 #define HAVE_MMAP 1
61 #define HAVE_SBRK 1
62 #define HAVE_STRINGS_H 1
63 #define HAVE_SYS_PARAM_H 1
64 #define HAVE_SYS_TIME_H 1
65
66 #endif
67
68 #if PLATFORM(FREEBSD)
69 #define HAVE_PTHREAD_NP_H 1
70 #endif
71
72 /* FIXME: if all platforms have these, do they really need #defines? */
73 #define HAVE_STDINT_H 1
74 #define HAVE_STRING_H 1
75
76 #define WTF_CHANGES 1
77
78 #ifdef __cplusplus
79 #undef new
80 #undef delete
81 #include <wtf/FastMalloc.h>
82 #endif
83
84 // this breaks compilation of <QFontDatabase>, at least, so turn it off for now
85 // Also generates errors on wx on Windows, because these functions
86 // are used from wx headers.
87 #if !PLATFORM(QT) && !PLATFORM(WX)
88 #include <wtf/DisallowCType.h>
89 #endif