srtp_config.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /*
  2. * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __SRTP_CONFIG_H__
  19. #define __SRTP_CONFIG_H__
  20. #include <pj/types.h>
  21. /* We'll just define CISC if it's x86 family */
  22. #if defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
  23. defined(_X86_) || defined(x86) || defined(__i386__) || \
  24. defined(__i386) || defined(_M_IX86) || defined(__I86__) || \
  25. defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
  26. defined(__x86_64__) || defined(__x86_64) || \
  27. defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
  28. defined(__IA64__) || defined(_M_IA64)
  29. # define CPU_CISC 1
  30. /* # define HAVE_X86 1 use X86 inlined assembly code */
  31. #else
  32. /*# define CPU_RISC 1*/
  33. # define CPU_CISC 1
  34. #endif
  35. /* Define to compile in dynamic debugging system. */
  36. #define ENABLE_DEBUGGING PJ_DEBUG
  37. /* Define to 1 if you have the <arpa/inet.h> header file. */
  38. #if defined(PJ_HAS_ARPA_INET_H) && PJ_HAS_ARPA_INET_H!=0
  39. # define HAVE_ARPA_INET_H 1
  40. #endif
  41. /* Define to 1 if you have the <inttypes.h> header file. */
  42. #if defined(PJ_HAS_INTTYPES_H) && PJ_HAS_INTTYPES_H!=0
  43. # define HAVE_INTTYPES_H 1
  44. #endif
  45. /* Define to 1 if you have the <byteswap.h> header file. */
  46. /* #undef HAVE_BYTESWAP_H */
  47. /* Define to 1 if you have the `inet_aton' function. */
  48. #if defined(PJ_SOCK_HAS_INET_PTON) && PJ_SOCK_HAS_INET_PTON
  49. # define HAVE_INET_ATON 1
  50. #endif
  51. /* Define to 1 if you have the <netinet/in.h> header file. */
  52. #if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H!=0
  53. # define HAVE_NETINET_IN_H 1
  54. #endif
  55. /* Define to 1 if you have the <stdlib.h> header file. */
  56. #if defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H!=0
  57. # define HAVE_STDLIB_H 1
  58. #endif
  59. /* Define to 1 if you have the <string.h> header file. */
  60. #if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H!=0
  61. # define HAVE_STRING_H 1
  62. #endif
  63. /* Define to 1 if you have the <sys/socket.h> header file. */
  64. #if defined(PJ_HAS_SYS_SOCKET_H) && PJ_HAS_SYS_SOCKET_H!=0
  65. # define HAVE_SYS_SOCKET_H 1
  66. #endif
  67. /* Define to 1 if you have the <sys/types.h> header file. */
  68. #if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H!=0
  69. # define HAVE_SYS_TYPES_H 1
  70. #endif
  71. /* Define to 1 if you have the <unistd.h> header file. */
  72. /* Define to 1 if you have the `usleep' function. */
  73. #if defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H!=0
  74. # define HAVE_UNISTD_H 1
  75. # define HAVE_USLEEP 1
  76. #endif
  77. /* Define to 1 if you have the <windows.h> header file. */
  78. #if (defined(PJ_WIN32) && PJ_WIN32!=0) || (defined(PJ_WIN64) && PJ_WIN64 != 0)
  79. # define HAVE_WINDOWS_H 1
  80. #endif
  81. /* Define to 1 if you have the <winsock2.h> header file. */
  82. #if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0
  83. # define HAVE_WINSOCK2_H 1
  84. #endif
  85. #define HAVE_INT16_T 1
  86. #define HAVE_INT32_T 1
  87. #define HAVE_INT8_T 1
  88. #define HAVE_UINT8_T 1
  89. #define HAVE_UINT16_T 1
  90. #define HAVE_UINT32_T 1
  91. #define HAVE_UINT64_T 1
  92. /* Define to 1 if you have the <stdint.h> header file. */
  93. #if defined(PJ_HAS_STDINT_H) && PJ_HAS_STDINT_H!=0
  94. # define HAVE_STDINT_H 1
  95. #else
  96. typedef pj_uint8_t uint8_t;
  97. typedef pj_uint16_t uint16_t;
  98. typedef pj_uint32_t uint32_t;
  99. typedef pj_uint64_t uint64_t;
  100. typedef pj_int8_t int8_t;
  101. typedef pj_int16_t int16_t;
  102. typedef pj_int32_t int32_t;
  103. typedef pj_int64_t int64_t;
  104. #endif
  105. /* These shouldn't really matter as long as HAVE_UINT64_T is set */
  106. #define SIZEOF_UNSIGNED_LONG (sizeof(unsigned long))
  107. #define SIZEOF_UNSIGNED_LONG_LONG 8
  108. #if (_MSC_VER >= 1400) // VC8+
  109. # ifndef _CRT_SECURE_NO_DEPRECATE
  110. # define _CRT_SECURE_NO_DEPRECATE
  111. # endif
  112. # ifndef _CRT_NONSTDC_NO_DEPRECATE
  113. # define _CRT_NONSTDC_NO_DEPRECATE
  114. # endif
  115. #endif // VC8+
  116. #ifdef _MSC_VER
  117. # ifndef __cplusplus
  118. # define inline _inline
  119. # endif
  120. # pragma warning(disable:4311) // 'type cast': pointer truncation from 'unsigned char *' to 'unsigned long'
  121. //# pragma warning(disable:4761) // integral mismatch
  122. # pragma warning(disable:4018) // '<' : signed/unsigned mismatch
  123. # pragma warning(disable:4244) // conversion from int64 to int
  124. # pragma warning(disable:4100) // unreferenced formal parameter
  125. # pragma warning(disable:4214) // bit field types other than int
  126. # pragma warning(disable:4389) // '!=' : signed/unsigned mismatch
  127. # pragma warning(disable:4701) // potentially uninitialized local variable used
  128. # pragma warning(disable:4702) // unreachable code
  129. # pragma warning(disable:4703) // potentially uninitialized local pointer variable used
  130. # pragma warning(disable:4204) // nonstandard extension used : non-constant aggregate initializer
  131. #endif
  132. /* clock() */
  133. #if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
  134. /* clock() causes unresolved symbol on linking */
  135. # define _CLOCK_T_DEFINED
  136. # define CLOCKS_PER_SEC 1000
  137. # define clock_t unsigned
  138. #include <windows.h>
  139. static clock_t clock(void)
  140. {
  141. return GetTickCount();
  142. }
  143. #endif
  144. /* Path to random device */
  145. /* #define DEV_URANDOM "/dev/urandom" */
  146. /* Only with PJSIP:
  147. * Try to open PJ_DEV_URANDOM if present
  148. */
  149. #if defined(PJ_HAS_FCNTL_H) && defined(PJ_HAS_UNISTD_H)
  150. # define PJ_DEV_URANDOM "/dev/urandom"
  151. #endif
  152. /* We have overridden libsrtp error mechanism, so these are not used. */
  153. /* #undef ERR_REPORTING_FILE */
  154. /* #undef ERR_REPORTING_STDOUT */
  155. /* #undef USE_ERR_REPORTING_FILE */
  156. /* #undef USE_SYSLOG */
  157. /* #undef HAVE_SYSLOG_H */
  158. /* Define this to use ISMAcryp code. */
  159. /* #undef GENERIC_AESICM */
  160. /* Define to 1 if you have the <inttypes.h> header file. */
  161. /* #undef HAVE_INTTYPES_H */
  162. /* Define to 1 if you have the `socket' function. */
  163. /* #undef HAVE_SOCKET */
  164. /* Define to 1 if you have the `socket' library (-lsocket). */
  165. /* #undef HAVE_LIBSOCKET */
  166. /* Define to 1 if you have the <machine/types.h> header file. */
  167. /* #undef HAVE_MACHINE_TYPES_H */
  168. /* Define to 1 if you have the <strings.h> header file. */
  169. //#define HAVE_STRINGS_H 1
  170. /* Define to 1 if you have the <sys/int_types.h> header file. */
  171. /* #undef HAVE_SYS_INT_TYPES_H */
  172. /* Define to use GDOI. */
  173. /* #undef SRTP_GDOI */
  174. /* Define to compile for kernel contexts. */
  175. /* #undef SRTP_KERNEL */
  176. /* Define to compile for Linux kernel context. */
  177. /* #undef SRTP_KERNEL_LINUX */
  178. /* Define to 1 if you have the ANSI C header files. */
  179. //#define STDC_HEADERS 1
  180. /* Endianness would have been set by pjlib. */
  181. /* #undef WORDS_BIGENDIAN */
  182. /* Define to empty if `const' does not conform to ANSI C. */
  183. /* #undef const */
  184. /* Define to `unsigned' if <sys/types.h> does not define. */
  185. /* #undef size_t */
  186. /* Define to the full name and version of this package. */
  187. #define PACKAGE_STRING "libsrtp 2.1.0"
  188. /* Define to the version of this package. */
  189. #define PACKAGE_VERSION "2.1.0"
  190. #endif /* __SRTP_CONFIG_H__ */