}
#endif
-static char *sig2str(int sig)
+static char *zap_sig2str(int sig)
{
static char buf[256];
switch(sig) {
}
}
+#define sig2str zap_sig2str
+
static int conf_add(struct zt_pvt *p, struct zt_subchannel *c, int index, int slavechannel)
{
/* If the conference already exists, and we're already in it
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];
#include <assert.h>
#endif
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#endif
+
#include <db.h>
#include "hash.h"
#include "page.h"
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#endif
#include <asterisk/frame.h>
#include <asterisk/sched.h>
#include <asterisk/chanvars.h>
#ifndef _LOGGER_H
#define _LOGGER_H
-
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#endif
#include <stdarg.h>
#if defined(__cplusplus) || defined(c_plusplus)
#ifndef _ASTERISK_UTIL_H
#define _ASTERISK_UTIL_H
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#endif
#include <netinet/in.h>
#include <netdb.h>
#include <pthread.h>
#define __P(p) p
#endif
-#define LITTLE_ENDIAN 1234
-#define BIG_ENDIAN 4321
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
+#include <alloca.h>
+#include <strings.h>
+#include <string.h>
+#include <pthread.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <netinet/in.h>
+
+#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__
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
## 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 <<EOF > $PPATH/asterisk.pc
install_prefix=$INSTALL_PREFIX
#include <asterisk/agi.h>
#include "../asterisk.h"
#include "../astconf.h"
+#ifdef SOLARIS
+#include <asterisk/astmm.h>
+#endif
#define MAX_ARGS 128
#define MAX_COMMANDS 128
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;
#include <sys/types.h>
#include <stdio.h>
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#endif
char* strsep(char** str, const char* delims)
{
return ret;
}
+
+int unsetenv(const char *name)
+{
+ setenv(name,"",0);
+}
+
integers, we break with tradition and refuse to look up a
pure integer */
s = host;
+ res = 0;
while(s && *s) {
if (!isdigit(*s))
break;
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)
$(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
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
+#ifdef SOLARIS
+#include <solaris-compat/compat.h>
+#define POPT_ARGFLAG_SHOW_DEFAULT 0x00800000
+#endif
+
/* SMS queuing application for use with asterisk app_sms */
/* by Adrian Kennard, 2004 - 2005 */