config.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (C) 2006, 2007, 2008 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. #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
  22. #ifdef BUILDING_WITH_CMAKE
  23. #include "cmakeconfig.h"
  24. #else
  25. #include "autotoolsconfig.h"
  26. #endif
  27. #endif
  28. #include <wtf/Platform.h>
  29. #include <wtf/ExportMacros.h>
  30. #if OS(WINDOWS)
  31. #ifndef _WIN32_WINNT
  32. #define _WIN32_WINNT 0x0502
  33. #endif
  34. #ifndef WINVER
  35. #define WINVER 0x0502
  36. #endif
  37. // If we don't define these, they get defined in windef.h.
  38. // We want to use std::min and std::max
  39. #define max max
  40. #define min min
  41. #if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
  42. // We need to define this before the first #include of stdlib.h or it won't contain rand_s.
  43. #ifndef _CRT_RAND_S
  44. #define _CRT_RAND_S
  45. #endif
  46. #endif
  47. #endif
  48. #define WTF_CHANGES 1
  49. #ifdef __cplusplus
  50. #undef new
  51. #undef delete
  52. #include <wtf/FastMalloc.h>
  53. #endif
  54. #include <wtf/DisallowCType.h>
  55. #if COMPILER(MSVC)
  56. #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
  57. #else
  58. #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
  59. #endif