Newer
Older
NetAddr-IP / Lite / Util / localconf.h
@Michael Robinton Michael Robinton on 21 Oct 2014 1 KB Import of MIKER/NetAddr-IP-4.018 from CPAN.
  1. /*
  2. * localconf.h
  3. *
  4. */
  5.  
  6. #include "config.h"
  7.  
  8. #ifdef WORDS_BIGENDIAN
  9. #define host_is_BIG_ENDIAN 1
  10. #else
  11. #define host_is_LITTLE_ENDIAN 1
  12. #endif
  13.  
  14. #include <stdio.h>
  15. #ifdef HAVE_SYS_TYPES_H
  16. # include <sys/types.h>
  17. #endif
  18. #ifdef HAVE_SYS_STAT_H
  19. # include <sys/stat.h>
  20. #endif
  21. #ifdef STDC_HEADERS
  22. # include <stdlib.h>
  23. # include <stddef.h>
  24. #else
  25. # ifdef HAVE_STDLIB_H
  26. # include <stdlib.h>
  27. # endif
  28. #endif
  29. #ifdef HAVE_STRING_H
  30. # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
  31. # include <memory.h>
  32. # endif
  33. # include <string.h>
  34. #endif
  35. #ifdef HAVE_STRINGS_H
  36. # include <strings.h>
  37. #endif
  38. #ifdef HAVE_INTTYPES_H
  39. # include <inttypes.h>
  40. #endif
  41. #ifdef HAVE_STDINT_H
  42. # include <stdint.h>
  43. #endif
  44. #ifdef HAVE_UNISTD_H
  45. # include <unistd.h>
  46. #endif
  47.  
  48. #ifdef HAVE_SYS_SOCKET_H
  49. # include <sys/socket.h>
  50. #endif
  51. #ifdef HAVE_NET_INET_H
  52. # include <netinet/in.h>
  53. #endif
  54. #ifdef HAVE_ARPA_INET_H
  55. # include <arpa/inet.h>
  56. #endif
  57. #ifdef HAVE_NETDB_H
  58. # include <netdb.h>
  59. #endif
  60.  
  61. #if SIZEOF_U_INT8_T == 0
  62. #undef SIZEOF_U_INT8_T
  63. #define SIZEOF_U_INT8_T SIZEOF_UINT8_T
  64. typedef uint8_t u_int8_t;
  65. #endif
  66.  
  67. #if SIZEOF_U_INT16_T == 0
  68. #undef SIZEOF_U_INT16_T
  69. #define SIZEOF_U_INT16_T SIZEOF_UINT16_T
  70. typedef uint16_t u_int16_t;
  71. #endif
  72.  
  73. #if SIZEOF_U_INT32_T == 0
  74. #undef SIZEOF_U_INT32_T
  75. #define SIZEOF_U_INT32_T SIZEOF_UINT32_T
  76. typedef uint32_t u_int32_t;
  77. #endif
  78.  
  79. #include "localperl.h"
  80.