Ignore:
Timestamp:
Jan 20, 2008 2:28:26 PM (16 years ago)
Author:
bennylp
Message:

Ticket #452: renamed SRTP config.h to srtp_config.h, added srtp_err.c to integrate SRTP logging to pjlib, and updated VS6/VS8/Makefile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/users/nanang/third_party/build/srtp/srtp_config.h

    r1718 r1719  
     1/* $Id$ */ 
     2/*  
     3 * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> 
     4 * 
     5 * This program is free software; you can redistribute it and/or modify 
     6 * it under the terms of the GNU General Public License as published by 
     7 * the Free Software Foundation; either version 2 of the License, or 
     8 * (at your option) any later version. 
     9 * 
     10 * This program is distributed in the hope that it will be useful, 
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 * GNU General Public License for more details. 
     14 * 
     15 * You should have received a copy of the GNU General Public License 
     16 * along with this program; if not, write to the Free Software 
     17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
     18 */ 
     19#ifndef __SRTP_CONFIG_H__ 
     20#define __SRTP_CONFIG_H__ 
     21 
    122#include <pj/types.h> 
    223 
    3 /* Define if building for a CISC machine (e.g. Intel). */ 
    4 /* #define CPU_CISC 1 */ 
    5  
    6 /* Define if building for a RISC machine (assume slow byte access). */ 
    7 /* #undef CPU_RISC */ 
    8  
    9 /* PJLIB can't detect CISC vs RISC CPU, so we'll just say RISC here */ 
    10 #if defined(PJ_WIN32) && PJ_WIN32!=0 
    11 #   define CPU_CISC     1 
     24/* We'll just define CISC if it's x86 family */ 
     25#if (defined(PJ_M_I386) && PJ_M_I386!=0) || \ 
     26    (defined(PJ_M_X86_64) && PJ_M_X86_64!=0) || \ 
     27    (defined(PJ_M_IA64) && PJ_M_IA64!=0) 
     28#   define CPU_CISC         1 
     29#   define HAVE_X86         1   /* use X86 inlined assembly code */ 
    1230#else 
    13 #   define CPU_RISC     1 
     31#   define CPU_RISC         1 
    1432#endif 
    1533 
    16 /* Path to random device */ 
    17 /* #define DEV_URANDOM "/dev/urandom" */ 
    18  
    1934/* Define to compile in dynamic debugging system. */ 
    20 #define ENABLE_DEBUGGING 1 
    21  
    22 /* Report errors to this file. */ 
    23 /* #undef ERR_REPORTING_FILE */ 
    24  
    25 /* Define to use logging to stdout. */ 
    26 //#define ERR_REPORTING_STDOUT 1 
    27  
    28 /* Define this to use ISMAcryp code. */ 
    29 /* #undef GENERIC_AESICM */ 
     35#define ENABLE_DEBUGGING    PJ_DEBUG 
    3036 
    3137/* Define to 1 if you have the <arpa/inet.h> header file. */ 
    32 #ifdef PJ_HAS_ARPA_INET_H  
     38#if defined(PJ_HAS_ARPA_INET_H) && PJ_HAS_ARPA_INET_H!=0 
    3339#   define HAVE_ARPA_INET_H 1 
    3440#endif 
     
    3844 
    3945/* Define to 1 if you have the `inet_aton' function. */ 
    40 #ifdef PJ_SOCK_HAS_INET_PTON 
     46#if defined(PJ_SOCK_HAS_INET_PTON) && PJ_SOCK_HAS_INET_PTON 
    4147#   define HAVE_INET_ATON   1 
    4248#endif 
    4349 
    44 /* Define to 1 if the system has the type `int16_t'. */ 
    45 #define HAVE_INT16_T 1 
    4650 
    47 /* Define to 1 if the system has the type `int32_t'. */ 
    48 #define HAVE_INT32_T 1 
     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 
    4955 
    50 /* Define to 1 if the system has the type `int8_t'. */ 
    51 #define HAVE_INT8_T 1 
     56/* Define to 1 if you have the <stdlib.h> header file. */ 
     57#if defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H!=0 
     58#   define HAVE_STDLIB_H    1 
     59#endif 
     60 
     61/* Define to 1 if you have the <string.h> header file. */ 
     62#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H!=0 
     63#   define HAVE_STRING_H    1 
     64#endif 
     65 
     66/* Define to 1 if you have the <sys/socket.h> header file. */ 
     67#if defined(PJ_HAS_SYS_SOCKET_H) && PJ_HAS_SYS_SOCKET_H!=0 
     68#   define HAVE_SYS_SOCKET_H    1 
     69#endif 
     70 
     71/* Define to 1 if you have the <sys/types.h> header file. */ 
     72#if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H!=0 
     73#   define HAVE_SYS_TYPES_H 1 
     74#endif 
     75 
     76/* Define to 1 if you have the <unistd.h> header file. */ 
     77/* Define to 1 if you have the `usleep' function. */ 
     78#if defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H!=0 
     79#   define HAVE_UNISTD_H    1 
     80#   define HAVE_USLEEP      1 
     81#endif 
     82 
     83 
     84/* Define to 1 if you have the <windows.h> header file. */ 
     85#if defined(PJ_WIN32) && PJ_WIN32!=0 
     86#   define HAVE_WINDOWS_H   1 
     87#endif 
     88 
     89/* Define to 1 if you have the <winsock2.h> header file. */ 
     90#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H!=0 
     91#   define HAVE_WINSOCK2_H  1 
     92#endif 
     93 
     94#define HAVE_INT16_T        1 
     95#define HAVE_INT32_T        1 
     96#define HAVE_INT8_T         1 
     97#define HAVE_UINT8_T        1 
     98#define HAVE_UINT16_T       1 
     99#define HAVE_UINT32_T       1 
     100#define HAVE_UINT64_T       1 
     101 
     102typedef pj_uint8_t          uint8_t; 
     103typedef pj_uint16_t         uint16_t; 
     104typedef pj_uint32_t         uint32_t; 
     105typedef pj_uint64_t         uint64_t; 
     106typedef pj_int8_t           int8_t; 
     107typedef pj_int16_t          int16_t; 
     108typedef pj_int32_t          int32_t; 
     109typedef pj_int64_t          int64_t; 
     110 
     111#define SIZEOF_UNSIGNED_LONG        (sizeof(unsigned long)) 
     112#define SIZEOF_UNSIGNED_LONG_LONG   8 
     113 
     114 
     115#if (_MSC_VER >= 1400) // VC8+ 
     116#   ifndef _CRT_SECURE_NO_DEPRECATE 
     117#       define _CRT_SECURE_NO_DEPRECATE 
     118#   endif 
     119#   ifndef _CRT_NONSTDC_NO_DEPRECATE 
     120#       define _CRT_NONSTDC_NO_DEPRECATE 
     121#   endif 
     122#endif // VC8+ 
     123 
     124#ifdef _MSC_VER 
     125#   ifndef __cplusplus 
     126#       define inline _inline 
     127#   endif 
     128 
     129#   pragma warning(disable:4311) 
     130#   pragma warning(disable:4761) // integral mismatch 
     131#   pragma warning(disable:4018) // signed/unsigned mismatch 
     132#   pragma warning(disable:4244) // conversion from int64 to int 
     133#endif 
     134 
     135 
     136/* Path to random device */ 
     137/* #define DEV_URANDOM "/dev/urandom" */ 
     138 
     139/* We have overridden libsrtp error mechanism, so these are not used. */ 
     140/* #undef ERR_REPORTING_FILE */ 
     141/* #undef ERR_REPORTING_STDOUT */ 
     142/* #undef USE_ERR_REPORTING_FILE */ 
     143/* #undef USE_SYSLOG */ 
     144/* #undef HAVE_SYSLOG_H */ 
     145 
     146 
     147/* Define this to use ISMAcryp code. */ 
     148/* #undef GENERIC_AESICM */ 
    52149 
    53150/* Define to 1 if you have the <inttypes.h> header file. */ 
    54151/* #undef HAVE_INTTYPES_H */ 
     152 
     153/* Define to 1 if you have the `socket' function. */ 
     154/* #undef HAVE_SOCKET */ 
    55155 
    56156/* Define to 1 if you have the `socket' library (-lsocket). */ 
     
    60160/* #undef HAVE_MACHINE_TYPES_H */ 
    61161 
    62 /* Define to 1 if you have the <memory.h> header file. */ 
    63 //#define HAVE_MEMORY_H 1 
    64  
    65 /* Define to 1 if you have the <netinet/in.h> header file. */ 
    66 #ifdef PJ_HAS_NETINET_IN_H 
    67 #   define HAVE_NETINET_IN_H    1 
    68 #endif 
    69  
    70 /* Define to 1 if you have the `socket' function. */ 
    71 /* #undef HAVE_SOCKET */ 
    72  
    73162/* Define to 1 if you have the <stdint.h> header file. */ 
    74163/* #undef HAVE_STDINT_H */ 
    75  
    76 /* Define to 1 if you have the <stdlib.h> header file. */ 
    77 #ifdef PJ_HAS_STDLIB_H 
    78 #   define HAVE_STDLIB_H 1 
    79 #endif 
    80164 
    81165/* Define to 1 if you have the <strings.h> header file. */ 
    82166//#define HAVE_STRINGS_H 1 
    83167 
    84 /* Define to 1 if you have the <string.h> header file. */ 
    85 #ifdef PJ_HAS_STRING_H 
    86 #   define HAVE_STRING_H 1 
    87 #endif 
    88  
    89 /* Define to 1 if you have the <syslog.h> header file. */ 
    90 /* #undef HAVE_SYSLOG_H */ 
    91  
    92168/* Define to 1 if you have the <sys/int_types.h> header file. */ 
    93169/* #undef HAVE_SYS_INT_TYPES_H */ 
    94  
    95 /* Define to 1 if you have the <sys/socket.h> header file. */ 
    96 #ifdef PJ_HAS_SYS_SOCKET_H 
    97 #   define HAVE_SYS_SOCKET_H    1 
    98 #endif 
    99  
    100 /* Define to 1 if you have the <sys/stat.h> header file. */ 
    101 //#define HAVE_SYS_STAT_H 1 
    102  
    103 /* Define to 1 if you have the <sys/types.h> header file. */ 
    104 #ifdef PJ_HAS_SYS_TYPES_H 
    105 #   define HAVE_SYS_TYPES_H 1 
    106 #endif 
    107  
    108 /* Define to 1 if you have the <sys/uio.h> header file. */ 
    109 /* #undef HAVE_SYS_UIO_H */ 
    110  
    111 /* Define to 1 if the system has the type `uint8_t'. */ 
    112 #define HAVE_UINT8_T 1 
    113  
    114 /* Define to 1 if the system has the type `uint16_t'. */ 
    115 #define HAVE_UINT16_T 1 
    116  
    117 /* Define to 1 if the system has the type `uint32_t'. */ 
    118 #define HAVE_UINT32_T 1 
    119  
    120 /* Define to 1 if the system has the type `uint64_t'. */ 
    121 #define HAVE_UINT64_T 1 
    122  
    123 /* Define to 1 if you have the <unistd.h> header file. */ 
    124 /* Define to 1 if you have the `usleep' function. */ 
    125 #ifdef PJ_HAS_UNISTD_H 
    126 #   define HAVE_UNISTD_H    1 
    127 #   define HAVE_USLEEP      1 
    128 #endif 
    129  
    130  
    131 /* Define to 1 if you have the <windows.h> header file. */ 
    132 #if defined(PJ_WIN32) && PJ_WIN32!=0 
    133 #   define HAVE_WINDOWS_H 1 
    134 #endif 
    135  
    136 /* Define to 1 if you have the <winsock2.h> header file. */ 
    137 #ifdef PJ_HAS_WINSOCK2_H  
    138 #   define HAVE_WINSOCK2_H 1 
    139 #endif 
    140  
    141 /* Define to use X86 inlined assembly code */ 
    142 /* #undef HAVE_X86 */ 
    143  
    144 /* Define to the address where bug reports for this package should be sent. */ 
    145 #define PACKAGE_BUGREPORT "" 
    146  
    147 /* Define to the full name of this package. */ 
    148 #define PACKAGE_NAME "" 
    149  
    150 /* Define to the full name and version of this package. */ 
    151 #define PACKAGE_STRING "" 
    152  
    153 /* Define to the one symbol short name of this package. */ 
    154 #define PACKAGE_TARNAME "" 
    155  
    156 /* Define to the version of this package. */ 
    157 #define PACKAGE_VERSION "" 
    158  
    159 /* The size of a `unsigned long', as computed by sizeof. */ 
    160 #define SIZEOF_UNSIGNED_LONG (sizeof(unsigned long)) 
    161  
    162 /* The size of a `unsigned long long', as computed by sizeof. */ 
    163 #define SIZEOF_UNSIGNED_LONG_LONG 8 
    164170 
    165171/* Define to use GDOI. */ 
     
    175181//#define STDC_HEADERS 1 
    176182 
    177 /* Write errors to this file */ 
    178 /* #undef USE_ERR_REPORTING_FILE */ 
    179  
    180 /* Define to use syslog logging. */ 
    181 /* #undef USE_SYSLOG */ 
    182  
    183 /* Define to 1 if your processor stores words with the most significant byte 
    184    first (like Motorola and SPARC, unlike Intel and VAX). */ 
     183/* Endianness would have been set by pjlib. */ 
    185184/* #undef WORDS_BIGENDIAN */ 
    186185 
     
    188187/* #undef const */ 
    189188 
    190 /* MSVC does't have "inline" */ 
    191 #if defined(_MSC_VER) 
    192 #   define inline _inline 
    193 #endif 
    194  
    195189/* Define to `unsigned' if <sys/types.h> does not define. */ 
    196190/* #undef size_t */ 
    197191 
    198 #if (_MSC_VER >= 1400) // VC8+ 
    199 #   ifndef _CRT_SECURE_NO_DEPRECATE 
    200 #       define _CRT_SECURE_NO_DEPRECATE 
    201 #   endif 
    202 #   ifndef _CRT_NONSTDC_NO_DEPRECATE 
    203 #       define _CRT_NONSTDC_NO_DEPRECATE 
    204 #   endif 
    205 #endif // VC8+ 
    206192 
    207 #ifndef int_types_defined 
    208     typedef pj_uint8_t  uint8_t; 
    209     typedef pj_uint16_t uint16_t; 
    210     typedef pj_uint32_t uint32_t; 
    211     typedef pj_uint64_t uint64_t; 
    212     typedef pj_int8_t   int8_t; 
    213     typedef pj_int16_t  int16_t; 
    214     typedef pj_int32_t  int32_t; 
    215     typedef pj_int64_t  int64_t; 
    216 #   define int_types_defined 
    217 #endif 
     193#endif  /* __SRTP_CONFIG_H__ */ 
    218194 
    219 #ifdef _MSC_VER 
    220     #pragma warning(disable:4311) 
    221     #pragma warning(disable:4761) // integral mismatch 
    222     #pragma warning(disable:4018) // signed/unsigned mismatch 
    223     #pragma warning(disable:4244) // conversion from int64 to int 
    224 #endif 
    225  
Note: See TracChangeset for help on using the changeset viewer.