config.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (C) 2008 Nuanti Ltd.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public License
  15. * along with this library; see the file COPYING.LIB. If not, write to
  16. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. *
  19. */
  20. #define Config_H
  21. #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
  22. #if defined(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. #include <runtime/JSExportMacros.h>
  31. #ifdef __cplusplus
  32. #undef new
  33. #undef delete
  34. #include <wtf/FastMalloc.h>
  35. #endif
  36. #if PLATFORM(MAC)
  37. #define WTF_USE_CF 1
  38. // FIXME: These can be removed after sufficient time has passed since the removal of BUILDING_ON / TARGETING macros.
  39. #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED 0 / 0
  40. #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED 0 / 0
  41. #define BUILDING_ON_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
  42. #define BUILDING_ON_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
  43. #define BUILDING_ON_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
  44. #define TARGETING_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
  45. #define TARGETING_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
  46. #define TARGETING_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
  47. #endif // PLATFORM(MAC)
  48. #if OS(WINDOWS)
  49. // If we don't define these, they get defined in windef.h.
  50. // We want to use std::min and std::max
  51. #undef max
  52. #define max max
  53. #undef min
  54. #define min min
  55. #endif
  56. #if PLATFORM(WIN)
  57. #define WTF_USE_CF 1
  58. #if PLATFORM(WIN_CAIRO)
  59. #define WTF_USE_CAIRO 1
  60. #define WTF_USE_CURL 1
  61. #else
  62. #define WTF_USE_CG 1
  63. #define WTF_USE_CFNETWORK 1
  64. #endif
  65. #undef _WIN32_WINNT
  66. #define _WIN32_WINNT 0x0502
  67. #undef WINVER
  68. #define WINVER 0x0502
  69. #undef _WINSOCKAPI_
  70. #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
  71. #endif // PLATFORM(WIN)
  72. #if OS(PSP2)
  73. #include <time.h>
  74. #include <unistd.h>
  75. #include <stdio.h>
  76. #include <list>
  77. #include "dummy.h"
  78. #endif