dispatch.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright (c) 2008-2013 Apple Inc. All rights reserved.
  3. *
  4. * @APPLE_APACHE_LICENSE_HEADER_START@
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * @APPLE_APACHE_LICENSE_HEADER_END@
  19. */
  20. #ifndef __DISPATCH_PUBLIC__
  21. #define __DISPATCH_PUBLIC__
  22. #ifdef __APPLE__
  23. #include <Availability.h>
  24. #include <os/availability.h>
  25. #include <TargetConditionals.h>
  26. #include <os/base.h>
  27. #elif defined(_WIN32)
  28. #include <os/generic_win_base.h>
  29. #elif defined(__unix__)
  30. #include <os/generic_unix_base.h>
  31. #endif
  32. #include <sys/types.h>
  33. #include <stddef.h>
  34. #include <stdint.h>
  35. #include <stdbool.h>
  36. #include <stdarg.h>
  37. #include <string.h>
  38. #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
  39. #include <unistd.h>
  40. #endif
  41. #include <fcntl.h>
  42. #if defined(_WIN32)
  43. #include <time.h>
  44. #endif
  45. #if (defined(__linux__) || defined(__FreeBSD__)) && defined(__has_feature)
  46. #if __has_feature(modules)
  47. #if !defined(__arm__)
  48. #include <stdio.h> // for off_t (to match Glibc.modulemap)
  49. #endif
  50. #endif
  51. #endif
  52. #define DISPATCH_API_VERSION 20180109
  53. #ifndef __DISPATCH_BUILDING_DISPATCH__
  54. #ifndef __DISPATCH_INDIRECT__
  55. #define __DISPATCH_INDIRECT__
  56. #endif
  57. #include <os/object.h>
  58. #include <dispatch/base.h>
  59. #include <dispatch/time.h>
  60. #include <dispatch/object.h>
  61. #include <dispatch/queue.h>
  62. #include <dispatch/block.h>
  63. #include <dispatch/source.h>
  64. #include <dispatch/group.h>
  65. #include <dispatch/semaphore.h>
  66. #include <dispatch/once.h>
  67. #include <dispatch/data.h>
  68. #include <dispatch/io.h>
  69. #undef __DISPATCH_INDIRECT__
  70. #endif /* !__DISPATCH_BUILDING_DISPATCH__ */
  71. #endif