Index: mkpkgconfig =================================================================== RCS file: /usr/cvsroot/asterisk/mkpkgconfig,v retrieving revision 1.3 diff -u -u -r1.3 mkpkgconfig --- mkpkgconfig 14 Dec 2004 23:36:29 -0000 1.3 +++ mkpkgconfig 27 Feb 2005 15:39:17 -0000 @@ -15,12 +15,12 @@ ## Clean out CFLAGS for the spec file. -LOCAL_CFLAGS=$(echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \ - sed -r -e 's/-I(include|\.\.\/include) //g' | - sed -e 's/-DINSTALL_PREFIX=\S* //g' | - sed -r -e 's/-DASTERISK_VERSION=\S* //g' | - sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g' -) +LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \ + sed -r -e 's/-I(include|\.\.\/include) //g' | \ + sed -e 's/-DINSTALL_PREFIX=\S* //g' | \ + sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \ + sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'` + cat < $PPATH/asterisk.pc install_prefix=$INSTALL_PREFIX Index: rtp.c =================================================================== RCS file: /usr/cvsroot/asterisk/rtp.c,v retrieving revision 1.110 diff -u -u -r1.110 rtp.c --- rtp.c 27 Feb 2005 05:59:24 -0000 1.110 +++ rtp.c 27 Feb 2005 15:39:21 -0000 @@ -1175,11 +1175,9 @@ return 0; } -#ifdef SOLARIS +#if defined(SOLARIS) && defined(__sparc__) static void put_uint32(unsigned char *buf, int i) { - unsigned char *c = (unsigned char *)&i; - buf[0] = (i>>24) & 0xff; buf[1] = (i>>16) & 0xff; buf[2] = (i>>8) & 0xff; Index: strcompat.c =================================================================== RCS file: /usr/cvsroot/asterisk/strcompat.c,v retrieving revision 1.1 diff -u -u -r1.1 strcompat.c --- strcompat.c 14 Dec 2004 23:36:29 -0000 1.1 +++ strcompat.c 27 Feb 2005 15:39:22 -0000 @@ -2,6 +2,9 @@ #include #include +#ifdef SOLARIS +#include +#endif char* strsep(char** str, const char* delims) { @@ -142,3 +145,9 @@ return ret; } + +int unsetenv(const char *name) +{ + setenv(name,"",0); +} + Index: utils.c =================================================================== RCS file: /usr/cvsroot/asterisk/utils.c,v retrieving revision 1.28 diff -u -u -r1.28 utils.c --- utils.c 18 Feb 2005 05:29:31 -0000 1.28 +++ utils.c 27 Feb 2005 15:39:22 -0000 @@ -163,6 +163,7 @@ integers, we break with tradition and refuse to look up a pure integer */ s = host; + res = 0; while(s && *s) { if (!isdigit(*s)) break; Index: channels/chan_zap.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v retrieving revision 1.409 diff -u -u -r1.409 chan_zap.c --- channels/chan_zap.c 25 Feb 2005 17:32:37 -0000 1.409 +++ channels/chan_zap.c 27 Feb 2005 15:39:46 -0000 @@ -1013,7 +1013,7 @@ } #endif -static char *sig2str(int sig) +static char *zap_sig2str(int sig) { static char buf[256]; switch(sig) { @@ -1068,6 +1068,8 @@ return buf; } } + +#define sig2str zap_sig2str static int conf_add(struct zt_pvt *p, struct zt_subchannel *c, int index, int slavechannel) { Index: channels/iax2-parser.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/iax2-parser.c,v retrieving revision 1.36 diff -u -u -r1.36 iax2-parser.c --- channels/iax2-parser.c 12 Feb 2005 18:52:14 -0000 1.36 +++ channels/iax2-parser.c 27 Feb 2005 15:39:47 -0000 @@ -30,7 +30,7 @@ static int iframes = 0; static int oframes = 0; -#ifdef SOLARIS +#if defined(SOLARIS) && defined(__sparc__) static unsigned int get_uint32(unsigned char *p) { return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; Index: db1-ast/hash/hash.c =================================================================== RCS file: /usr/cvsroot/asterisk/db1-ast/hash/hash.c,v retrieving revision 1.1 diff -u -u -r1.1 hash.c --- db1-ast/hash/hash.c 4 Jan 2003 18:49:21 -0000 1.1 +++ db1-ast/hash/hash.c 27 Feb 2005 15:39:48 -0000 @@ -51,6 +51,10 @@ #include #endif +#ifdef SOLARIS +#include +#endif + #include #include "hash.h" #include "page.h" Index: include/asterisk/channel.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v retrieving revision 1.75 diff -u -u -r1.75 channel.h --- include/asterisk/channel.h 23 Feb 2005 22:48:47 -0000 1.75 +++ include/asterisk/channel.h 27 Feb 2005 15:39:49 -0000 @@ -14,6 +14,9 @@ #ifndef _ASTERISK_CHANNEL_H #define _ASTERISK_CHANNEL_H +#ifdef SOLARIS +#include +#endif #include #include #include Index: include/asterisk/logger.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/logger.h,v retrieving revision 1.10 diff -u -u -r1.10 logger.h --- include/asterisk/logger.h 15 Jan 2005 23:48:12 -0000 1.10 +++ include/asterisk/logger.h 27 Feb 2005 15:39:49 -0000 @@ -13,7 +13,9 @@ #ifndef _LOGGER_H #define _LOGGER_H - +#ifdef SOLARIS +#include +#endif #include #if defined(__cplusplus) || defined(c_plusplus) Index: include/asterisk/utils.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/asterisk/utils.h,v retrieving revision 1.21 diff -u -u -r1.21 utils.h --- include/asterisk/utils.h 18 Feb 2005 05:29:31 -0000 1.21 +++ include/asterisk/utils.h 27 Feb 2005 15:39:49 -0000 @@ -12,6 +12,9 @@ #ifndef _ASTERISK_UTIL_H #define _ASTERISK_UTIL_H +#ifdef SOLARIS +#include +#endif #include #include #include Index: include/solaris-compat/compat.h =================================================================== RCS file: /usr/cvsroot/asterisk/include/solaris-compat/compat.h,v retrieving revision 1.1 diff -u -u -r1.1 compat.h --- include/solaris-compat/compat.h 14 Dec 2004 23:36:30 -0000 1.1 +++ include/solaris-compat/compat.h 27 Feb 2005 15:39:49 -0000 @@ -8,18 +8,29 @@ #define __P(p) p #endif -#define LITTLE_ENDIAN 1234 -#define BIG_ENDIAN 4321 +#include +#include +#include +#include +#include +#include +#include -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 +#ifndef BYTE_ORDER +#define LITTLE_ENDIAN 1234 +#define BIG_ENDIAN 4321 #ifdef __sparc__ -#define BYTE_ORDER BIG_ENDIAN -#define __BYTE_ORDER BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN #else -#define BYTE_ORDER LITTLE_ENDIAN -#define ____BYTE_ORDER BIG_ENDIAN +#define BYTE_ORDER LITTLE_ENDIAN +#endif +#endif + +#ifndef __BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BIG_ENDIAN BIG_ENDIAN +#define __BYTE_ORDER BYTE_ORDER #endif #ifndef __BIT_TYPES_DEFINED__ @@ -29,6 +40,9 @@ typedef unsigned int u_int32_t; #endif +char* strsep(char** str, const char* delims); +uint64_t +strtoq(const char *nptr, char **endptr, int base); int setenv(const char *name, const char *value, int overwrite); - +int unsetenv(const char *name); #endif Index: res/res_agi.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v retrieving revision 1.25 diff -u -u -r1.25 res_agi.c --- res/res_agi.c 21 Jan 2005 07:06:25 -0000 1.25 +++ res/res_agi.c 27 Feb 2005 15:39:51 -0000 @@ -48,6 +48,9 @@ #include #include "../asterisk.h" #include "../astconf.h" +#ifdef SOLARIS +#include +#endif #define MAX_ARGS 128 #define MAX_COMMANDS 128 Index: utils/Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/utils/Makefile,v retrieving revision 1.6 diff -u -u -r1.6 Makefile --- utils/Makefile 21 Jan 2005 03:56:22 -0000 1.6 +++ utils/Makefile 27 Feb 2005 15:39:52 -0000 @@ -12,6 +12,9 @@ TARGET+=$(shell if [ -f /usr/include/popt.h ]; then echo "smsq"; else if [ -f /usr/local/include/popt.h ]; then echo "smsq"; fi ; fi) TARGET+=$(shell if [ -f /usr/include/newt.h ]; then echo "astman"; else if [ -f /usr/local/include/newt.h ]; then echo "astman"; fi ; fi) +ifeq (${OSARCH},SunOS) +SOL=../strcompat.o +endif all: depend $(TARGET) @@ -32,7 +35,7 @@ $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm smsq: smsq.o - $(CC) $(CFLAGS) -o smsq smsq.o -lpopt + $(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt ifneq ($(wildcard .depend),) include .depend Index: utils/smsq.c =================================================================== RCS file: /usr/cvsroot/asterisk/utils/smsq.c,v retrieving revision 1.5 diff -u -u -r1.5 smsq.c --- utils/smsq.c 21 Jan 2005 07:06:25 -0000 1.5 +++ utils/smsq.c 27 Feb 2005 15:39:53 -0000 @@ -9,6 +9,11 @@ #include #include #include +#ifdef SOLARIS +#include +#define POPT_ARGFLAG_SHOW_DEFAULT 0x00800000 +#endif + /* SMS queuing application for use with asterisk app_sms */ /* by Adrian Kennard, 2004 - 2005 */