summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2011-10-24 09:28:13 +0000
committerLiong Sauw Ming <ming@teluu.com>2011-10-24 09:28:13 +0000
commit2068f13bc42cf3a47374aa2765f82724a5782028 (patch)
tree29fbeaa152ab51e59b650c0d7cd83a38111e1ecc /pjlib/include
parent1c72a42676e7aa0c2ae0734549050f738f3bdf02 (diff)
Re #1395: Backport of PJSIP 1.x branch into PJSIP 2.0 trunk
* Backport of r3557:r3832 TODO: ticket #1268 (Option for automatic/manual sending of RTCP SDES/BYE for the stream) for video stream. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3841 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r--pjlib/include/pj/compat/os_auto.h.in2
-rw-r--r--pjlib/include/pj/compat/os_symbian.h5
-rw-r--r--pjlib/include/pj/compat/os_win32_wince.h6
-rw-r--r--pjlib/include/pj/config.h23
-rw-r--r--pjlib/include/pj/hash.h4
-rw-r--r--pjlib/include/pj/sock.h9
6 files changed, 34 insertions, 15 deletions
diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in
index 1dc88028..77980d36 100644
--- a/pjlib/include/pj/compat/os_auto.h.in
+++ b/pjlib/include/pj/compat/os_auto.h.in
@@ -177,6 +177,8 @@
# include "Availability.h"
/* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */
# define PJ_GETADDRINFO_USE_CFHOST 1
+ /* Disable local host resolution in pj_gethostip() (see ticket #1342) */
+# define PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION 1
# ifdef __IPHONE_4_0
/* Is multitasking support available? (see ticket #1107) */
# define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 1
diff --git a/pjlib/include/pj/compat/os_symbian.h b/pjlib/include/pj/compat/os_symbian.h
index 62bd3e9f..9f953648 100644
--- a/pjlib/include/pj/compat/os_symbian.h
+++ b/pjlib/include/pj/compat/os_symbian.h
@@ -108,6 +108,11 @@
# define NULL 0
#endif
+/* Endianness */
+#ifndef PJ_IS_LITTLE_ENDIAN
+# define PJ_IS_LITTLE_ENDIAN 1
+# define PJ_IS_BIG_ENDIAN 0
+#endif
/* Doesn't seem to allow more than this */
#define PJ_IOQUEUE_MAX_HANDLES 8
diff --git a/pjlib/include/pj/compat/os_win32_wince.h b/pjlib/include/pj/compat/os_win32_wince.h
index 043bb632..9ae05313 100644
--- a/pjlib/include/pj/compat/os_win32_wince.h
+++ b/pjlib/include/pj/compat/os_win32_wince.h
@@ -98,6 +98,12 @@
*/
#define PJ_SELECT_NEEDS_NFDS 0
+/* Endianness */
+#ifndef PJ_IS_LITTLE_ENDIAN
+# define PJ_IS_LITTLE_ENDIAN 1
+# define PJ_IS_BIG_ENDIAN 0
+#endif
+
/* Default threading is enabled, unless it's overridden. */
#ifndef PJ_HAS_THREADS
# define PJ_HAS_THREADS (1)
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index c96d0ce8..dd3533e8 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -170,7 +170,7 @@
#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
defined(__IA64__) || defined( _M_IA64)
/*
- * Intel IA64 processor, little endian
+ * Intel IA64 processor, default to little endian
*/
# undef PJ_M_IA64
# define PJ_M_IA64 1
@@ -208,15 +208,14 @@
#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
/*
- * MIPS, default to little endian
+ * MIPS, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_MIPS
# define PJ_M_MIPS 1
# define PJ_M_NAME "mips"
# define PJ_HAS_PENTIUM 0
-# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
-# define PJ_IS_LITTLE_ENDIAN 1
-# define PJ_IS_BIG_ENDIAN 0
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
# endif
@@ -234,29 +233,29 @@
#elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \
defined(ARMV4) || defined(__arm__)
/*
- * ARM, default to little endian
+ * ARM, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_ARMV4
# define PJ_M_ARMV4 1
# define PJ_M_NAME "armv4"
# define PJ_HAS_PENTIUM 0
-# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
-# define PJ_IS_LITTLE_ENDIAN 1
-# define PJ_IS_BIG_ENDIAN 0
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
# endif
#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
defined(_ARCH_PPC)
/*
- * PowerPC, big endian
+ * PowerPC, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_POWERPC
# define PJ_M_POWERPC 1
# define PJ_M_NAME "powerpc"
# define PJ_HAS_PENTIUM 0
-# define PJ_IS_LITTLE_ENDIAN 0
-# define PJ_IS_BIG_ENDIAN 1
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
+# endif
#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
diff --git a/pjlib/include/pj/hash.h b/pjlib/include/pj/hash.h
index e7cf9d33..7b9f6df3 100644
--- a/pjlib/include/pj/hash.h
+++ b/pjlib/include/pj/hash.h
@@ -125,8 +125,8 @@ PJ_DECL(void *) pj_hash_get( pj_hash_table_t *ht,
* @param pool the pool to allocate the new entry if a new entry has to be
* created.
* @param ht the hash table.
- * @param key the key, which MUST point to buffer that remains valid
- * for the duration of the entry.
+ * @param key the key. If pool is not specified, the key MUST point to
+ * buffer that remains valid for the duration of the entry.
* @param keylen the length of the key, or PJ_HASH_KEY_STRING to use the
* string length of the key.
* @param hval if the value is not zero, then the hash table will use
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h
index 88152c05..83d35db9 100644
--- a/pjlib/include/pj/sock.h
+++ b/pjlib/include/pj/sock.h
@@ -493,6 +493,13 @@ typedef struct pj_in_addr
*/
#define PJ_INET6_ADDRSTRLEN 46
+/**
+ * The size of sin_zero field in pj_sockaddr_in structure. Most OSes
+ * use 8, but others such as the BSD TCP/IP stack in eCos uses 24.
+ */
+#ifndef PJ_SOCKADDR_IN_SIN_ZERO_LEN
+# define PJ_SOCKADDR_IN_SIN_ZERO_LEN 8
+#endif
/**
* This structure describes Internet socket address.
@@ -512,7 +519,7 @@ struct pj_sockaddr_in
#endif
pj_uint16_t sin_port; /**< Transport layer port number. */
pj_in_addr sin_addr; /**< IP address. */
- char sin_zero[8]; /**< Padding. */
+ char sin_zero[PJ_SOCKADDR_IN_SIN_ZERO_LEN]; /**< Padding.*/
};