ares_build.h.in 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #ifndef __CARES_BUILD_H
  2. #define __CARES_BUILD_H
  3. /* $Id$ */
  4. /* Copyright (C) 2009 by Daniel Stenberg et al
  5. *
  6. * Permission to use, copy, modify, and distribute this software and its
  7. * documentation for any purpose and without fee is hereby granted, provided
  8. * that the above copyright notice appear in all copies and that both that
  9. * copyright notice and this permission notice appear in supporting
  10. * documentation, and that the name of M.I.T. not be used in advertising or
  11. * publicity pertaining to distribution of the software without specific,
  12. * written prior permission. M.I.T. makes no representations about the
  13. * suitability of this software for any purpose. It is provided "as is"
  14. * without express or implied warranty.
  15. */
  16. /* ================================================================ */
  17. /* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
  18. /* ================================================================ */
  19. /*
  20. * NOTE 1:
  21. * -------
  22. *
  23. * Nothing in this file is intended to be modified or adjusted by the
  24. * c-ares library user nor by the c-ares library builder.
  25. *
  26. * If you think that something actually needs to be changed, adjusted
  27. * or fixed in this file, then, report it on the c-ares development
  28. * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
  29. *
  30. * This header file shall only export symbols which are 'cares' or 'CARES'
  31. * prefixed, otherwise public name space would be polluted.
  32. *
  33. * NOTE 2:
  34. * -------
  35. *
  36. * Right now you might be staring at file ares_build.h.in or ares_build.h,
  37. * this is due to the following reason:
  38. *
  39. * On systems capable of running the configure script, the configure process
  40. * will overwrite the distributed ares_build.h file with one that is suitable
  41. * and specific to the library being configured and built, which is generated
  42. * from the ares_build.h.in template file.
  43. *
  44. */
  45. /* ================================================================ */
  46. /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
  47. /* ================================================================ */
  48. #ifdef CARES_SIZEOF_LONG
  49. # error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
  50. Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
  51. #endif
  52. #ifdef CARES_TYPEOF_ARES_SOCKLEN_T
  53. # error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
  54. Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
  55. #endif
  56. #ifdef CARES_SIZEOF_ARES_SOCKLEN_T
  57. # error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
  58. Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
  59. #endif
  60. /* ================================================================ */
  61. /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
  62. /* ================================================================ */
  63. /* Configure process defines this to 1 when it finds out that system */
  64. /* header file ws2tcpip.h must be included by the external interface. */
  65. #undef CARES_PULL_WS2TCPIP_H
  66. #ifdef CARES_PULL_WS2TCPIP_H
  67. # ifndef WIN32_LEAN_AND_MEAN
  68. # define WIN32_LEAN_AND_MEAN
  69. # endif
  70. # include <windows.h>
  71. # include <winsock2.h>
  72. # include <ws2tcpip.h>
  73. #endif
  74. /* Configure process defines this to 1 when it finds out that system */
  75. /* header file sys/types.h must be included by the external interface. */
  76. #undef CARES_PULL_SYS_TYPES_H
  77. #ifdef CARES_PULL_SYS_TYPES_H
  78. # include <sys/types.h>
  79. #endif
  80. /* Configure process defines this to 1 when it finds out that system */
  81. /* header file sys/socket.h must be included by the external interface. */
  82. #undef CARES_PULL_SYS_SOCKET_H
  83. #ifdef CARES_PULL_SYS_SOCKET_H
  84. # include <sys/socket.h>
  85. #endif
  86. /* The size of `long', as computed by sizeof. */
  87. #undef CARES_SIZEOF_LONG
  88. /* Integral data type used for ares_socklen_t. */
  89. #undef CARES_TYPEOF_ARES_SOCKLEN_T
  90. /* The size of `ares_socklen_t', as computed by sizeof. */
  91. #undef CARES_SIZEOF_ARES_SOCKLEN_T
  92. /* Data type definition of ares_socklen_t. */
  93. typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
  94. #endif /* __CARES_BUILD_H */