WebKitPrefix.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
  14. * its contributors may be used to endorse or promote products derived
  15. * from this software without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
  18. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
  21. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. #ifdef __cplusplus
  29. #define NULL __null
  30. #else
  31. #define NULL ((void *)0)
  32. #endif
  33. #import <stddef.h>
  34. #import <stdio.h>
  35. #import <fcntl.h>
  36. #import <errno.h>
  37. #import <unistd.h>
  38. #import <signal.h>
  39. #import <sys/types.h>
  40. #import <sys/time.h>
  41. #import <sys/resource.h>
  42. #import <pthread.h>
  43. #import <CoreGraphics/CoreGraphics.h>
  44. #ifdef __cplusplus
  45. #include <algorithm> // needed for exception_defines.h
  46. #include <cstddef>
  47. #include <new>
  48. #endif
  49. #import <ApplicationServices/ApplicationServices.h>
  50. #import <Carbon/Carbon.h>
  51. #ifndef CGFLOAT_DEFINED
  52. #ifdef __LP64__
  53. typedef double CGFloat;
  54. #else
  55. typedef float CGFloat;
  56. #endif
  57. #define CGFLOAT_DEFINED 1
  58. #endif
  59. #ifdef __OBJC__
  60. #import <Cocoa/Cocoa.h>
  61. #endif
  62. #include <wtf/Platform.h>
  63. #include <wtf/ExportMacros.h>
  64. #include <runtime/JSExportMacros.h>
  65. #include <WebCore/PlatformExportMacros.h>
  66. #include <WebCore/EmptyProtocolDefinitions.h>
  67. /* Work around bug with C++ library that screws up Objective-C++ when exception support is disabled. */
  68. #undef try
  69. #undef catch
  70. #ifdef __cplusplus
  71. #include <wtf/FastMalloc.h>
  72. #endif
  73. #include <wtf/DisallowCType.h>