summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-23 14:38:49 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-23 14:38:49 +0000
commit506a01d84b9577c45ec6f95be15345017c96b809 (patch)
tree6597111b01ad386a463d90d27aa7973494a394db /pjlib
parent0e925222f36d4f3d34a88cbe149f8f761d47ac26 (diff)
Added 64bit Linux target (x86_64), also fixed compilation warnings when compiling for this target
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@624 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/include/pj/compat/m_x86_64.h35
-rw-r--r--pjlib/include/pj/config.h2
-rw-r--r--pjlib/src/pj/ioqueue_common_abs.c4
-rw-r--r--pjlib/src/pj/pool_caching.c4
4 files changed, 41 insertions, 4 deletions
diff --git a/pjlib/include/pj/compat/m_x86_64.h b/pjlib/include/pj/compat/m_x86_64.h
new file mode 100644
index 00000000..e1e33935
--- /dev/null
+++ b/pjlib/include/pj/compat/m_x86_64.h
@@ -0,0 +1,35 @@
+/* $Id$ */
+/*
+ * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJ_COMPAT_M_x86_64_H__
+#define __PJ_COMPAT_M_x86_64_H__
+
+/**
+ * @file m_i386.h
+ * @brief Describes 64bit x86 Intel/AMD family processor specifics.
+ */
+
+#define PJ_M_NAME "x86_64"
+
+#define PJ_HAS_PENTIUM 1
+#define PJ_IS_LITTLE_ENDIAN 1
+#define PJ_IS_BIG_ENDIAN 0
+
+
+#endif /* __PJ_COMPAT_M_x86_64_H__ */
+
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index 1d74d8c7..251f7f7b 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -65,6 +65,8 @@
*/
#if defined (PJ_M_I386) && PJ_M_I386 != 0
# include <pj/compat/m_i386.h>
+#elif defined (PJ_M_X86_64) && PJ_M_X86_64 != 0
+# include <pj/compat/m_x86_64.h>
#elif defined (PJ_M_M68K) && PJ_M_M68K != 0
# include <pj/compat/m_m68k.h>
#elif defined (PJ_M_ALPHA) && PJ_M_ALPHA != 0
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c
index 5356f91d..be562fa7 100644
--- a/pjlib/src/pj/ioqueue_common_abs.c
+++ b/pjlib/src/pj/ioqueue_common_abs.c
@@ -208,7 +208,7 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h)
*/
{
int value;
- socklen_t vallen = sizeof(value);
+ int vallen = sizeof(value);
int gs_rc = pj_sock_getsockopt(h->fd, SOL_SOCKET, SO_ERROR,
&value, &vallen);
if (gs_rc != 0) {
@@ -528,7 +528,7 @@ void ioqueue_dispatch_exception_event( pj_ioqueue_t *ioqueue,
pj_status_t status = -1;
#if (defined(PJ_HAS_SO_ERROR) && PJ_HAS_SO_ERROR!=0)
int value;
- socklen_t vallen = sizeof(value);
+ int vallen = sizeof(value);
int gs_rc = pj_sock_getsockopt(h->fd, SOL_SOCKET, SO_ERROR,
&value, &vallen);
if (gs_rc == 0) {
diff --git a/pjlib/src/pj/pool_caching.c b/pjlib/src/pj/pool_caching.c
index e0eecd4d..192bf380 100644
--- a/pjlib/src/pj/pool_caching.c
+++ b/pjlib/src/pj/pool_caching.c
@@ -175,7 +175,7 @@ static pj_pool_t* cpool_create_pool(pj_pool_factory *pf,
pj_list_insert_before( &cp->used_list, pool );
/* Mark factory data */
- pool->factory_data = (void*) idx;
+ pool->factory_data = (void*) (long) idx;
/* Increment used count. */
++cp->used_count;
@@ -225,7 +225,7 @@ static void cpool_release_pool( pj_pool_factory *pf, pj_pool_t *pool)
/*
* Otherwise put the pool in our recycle list.
*/
- i = (unsigned)pool->factory_data;
+ i = (unsigned) (unsigned long) pool->factory_data;
pj_assert(i<PJ_CACHING_POOL_ARRAY_SIZE);
if (i >= PJ_CACHING_POOL_ARRAY_SIZE ) {