fspr_want.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include "fspr.h" /* configuration data */
  17. /**
  18. * @file fspr_want.h
  19. * @brief APR Standard Headers Support
  20. *
  21. * <PRE>
  22. * Features:
  23. *
  24. * APR_WANT_STRFUNC: strcmp, strcat, strcpy, etc
  25. * APR_WANT_MEMFUNC: memcmp, memcpy, etc
  26. * APR_WANT_STDIO: <stdio.h> and related bits
  27. * APR_WANT_IOVEC: struct iovec
  28. * APR_WANT_BYTEFUNC: htons, htonl, ntohl, ntohs
  29. *
  30. * Typical usage:
  31. *
  32. * #define APR_WANT_STRFUNC
  33. * #define APR_WANT_MEMFUNC
  34. * #include "fspr_want.h"
  35. *
  36. * The appropriate headers will be included.
  37. *
  38. * Note: it is safe to use this in a header (it won't interfere with other
  39. * headers' or source files' use of fspr_want.h)
  40. * </PRE>
  41. */
  42. /* --------------------------------------------------------------------- */
  43. #ifdef APR_WANT_STRFUNC
  44. #if APR_HAVE_STRING_H
  45. #include <string.h>
  46. #endif
  47. #if APR_HAVE_STRINGS_H
  48. #include <strings.h>
  49. #endif
  50. #undef APR_WANT_STRFUNC
  51. #endif
  52. /* --------------------------------------------------------------------- */
  53. #ifdef APR_WANT_MEMFUNC
  54. #if APR_HAVE_STRING_H
  55. #include <string.h>
  56. #endif
  57. #undef APR_WANT_MEMFUNC
  58. #endif
  59. /* --------------------------------------------------------------------- */
  60. #ifdef APR_WANT_STDIO
  61. #if APR_HAVE_STDIO_H
  62. #include <stdio.h>
  63. #endif
  64. #undef APR_WANT_STDIO
  65. #endif
  66. /* --------------------------------------------------------------------- */
  67. #ifdef APR_WANT_IOVEC
  68. #if APR_HAVE_SYS_UIO_H
  69. #include <sys/uio.h>
  70. #endif
  71. #undef APR_WANT_IOVEC
  72. #endif
  73. /* --------------------------------------------------------------------- */
  74. #ifdef APR_WANT_BYTEFUNC
  75. /* Single Unix says they are in arpa/inet.h. Linux has them in
  76. * netinet/in.h. FreeBSD has them in arpa/inet.h but requires that
  77. * netinet/in.h be included first.
  78. */
  79. #if APR_HAVE_NETINET_IN_H
  80. #include <netinet/in.h>
  81. #endif
  82. #if APR_HAVE_ARPA_INET_H
  83. #include <arpa/inet.h>
  84. #endif
  85. #undef APR_WANT_BYTEFUNC
  86. #endif
  87. /* --------------------------------------------------------------------- */