source: webkit/trunk/JavaScriptCore/kjs/config.h@ 30679

Last change on this file since 30679 was 29941, checked in by [email protected], 17 years ago

Reviewed by darin. Landed by eseidel.

Add #define guards for WIN32_LEAN_AND_MEAN and _CRT_RAND_S.

  • kjs/config.h:
  • wtf/FastMalloc.cpp:
  • wtf/TCSpinLock.h:
  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1/*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <[email protected]>
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#if PLATFORM(MAC)
25#define HAVE_JNI 1
26#endif
27
28#if PLATFORM(DARWIN)
29
30#define HAVE_ERRNO_H 1
31#define HAVE_MMAP 1
32#define HAVE_MERGESORT 1
33#define HAVE_SBRK 1
34#define HAVE_STRINGS_H 1
35#define HAVE_SYS_PARAM_H 1
36#define HAVE_SYS_TIME_H 1
37#define HAVE_SYS_TIMEB_H 1
38
39#elif PLATFORM(WIN_OS)
40
41// If we don't define these, they get defined in windef.h.
42// We want to use std::min and std::max
43#define max max
44#define min min
45
46#if !COMPILER(MSVC7)
47// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
48#ifndef _CRT_RAND_S
49#define _CRT_RAND_S
50#endif
51#endif
52
53#define HAVE_FLOAT_H 1
54#define HAVE_SYS_TIMEB_H 1
55#define HAVE_VIRTUALALLOC 1
56
57#else
58
59/* FIXME: is this actually used or do other platforms generate their own config.h? */
60
61#define HAVE_ERRNO_H 1
62#define HAVE_MMAP 1
63#define HAVE_SBRK 1
64#define HAVE_STRINGS_H 1
65#define HAVE_SYS_PARAM_H 1
66#define HAVE_SYS_TIME_H 1
67
68#endif
69
70#if PLATFORM(FREEBSD)
71#define HAVE_PTHREAD_NP_H 1
72#endif
73
74/* FIXME: if all platforms have these, do they really need #defines? */
75#define HAVE_STDINT_H 1
76#define HAVE_STRING_H 1
77
78#define WTF_CHANGES 1
79
80#ifdef __cplusplus
81#undef new
82#undef delete
83#include <wtf/FastMalloc.h>
84#endif
85
86// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
87// Also generates errors on wx on Windows, because these functions
88// are used from wx headers.
89#if !PLATFORM(QT) && !PLATFORM(WX)
90#include <wtf/DisallowCType.h>
91#endif
Note: See TracBrowser for help on using the repository browser.