Revert the previous patch since it's braking compilation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Martin Pycko
2003-10-16 21:11:29 +00:00
parent d5b54e4b7f
commit 13b7b73b08
10 changed files with 36 additions and 66 deletions

View File

@@ -98,9 +98,6 @@ CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarati
CFLAGS+=$(OPTIMIZE) CFLAGS+=$(OPTIMIZE)
CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
ifeq (${OSARCH},FreeBSD)
CFLAGS+=-pthread
endif
ifeq (${OSARCH},OpenBSD) ifeq (${OSARCH},OpenBSD)
CFLAGS+=-pthread CFLAGS+=-pthread
endif endif
@@ -134,18 +131,7 @@ SUBDIRS=res channels pbx apps codecs formats agi cdr astman
ifeq (${OSARCH},Linux) ifeq (${OSARCH},Linux)
LIBS=-ldl LIBS=-ldl
endif endif
ifeq (${OSARCH},OpenBSD) LIBS+=-lpthread -lncurses -lm -lresolv #-lnjamd
LIBS=-pthread
else
ifeq (${OSARCH},FreeBSD)
LIBS=-pthread
else
endif
endif
LIBS+=-lncurses -lm
ifeq (${OSARCH},Linux)
-lresolv #-lnjamd
endif
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
translate.o file.o say.o pbx.o cli.o md5.o term.o \ translate.o file.o say.o pbx.o cli.o md5.o term.o \
ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \ ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \

View File

@@ -28,8 +28,6 @@
#include <sys/time.h> #include <sys/time.h>
#ifdef __linux__ #ifdef __linux__
#include <linux/soundcard.h> #include <linux/soundcard.h>
#elif defined(__FreeBSD__)
#include <machine/soundcard.h>
#else #else
#include <soundcard.h> #include <soundcard.h>
#endif #endif

View File

@@ -91,13 +91,12 @@ ringtone.h: gentone
chan_oss.o: chan_oss.c busy.h ringtone.h chan_oss.o: chan_oss.c busy.h ringtone.h
ifeq (${OSARCH},OpenBSD)
chan_oss.so: chan_oss.o
$(CC) -shared -Xlinker -x -o $@ chan_oss.o -lossaudio
endif
chan_iax2.so: chan_iax2.o iax2-parser.o chan_iax2.so: chan_iax2.o iax2-parser.o
ifeq (${OSARCH},Linux)
$(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o $(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o
else
$(CC) -shared -Xlinker -x -o $@ chan_iax2.o iax2-parser.o -lossaudio
endif
chan_zap.o: $(CHANZAP) chan_zap.o: $(CHANZAP)
$(CC) -c $(CFLAGS) -o chan_zap.o $(CHANZAP) $(CC) -c $(CFLAGS) -o chan_zap.o $(CHANZAP)

View File

@@ -532,7 +532,7 @@ static void showframe(struct ast_iax_frame *f, struct ast_iax_full_hdr *fhi, int
(rx ? "Rx" : "Tx"), (rx ? "Rx" : "Tx"),
retries, ntohs(fh->seqno), class, subclass); retries, ntohs(fh->seqno), class, subclass);
fprintf(stderr, fprintf(stderr,
" Timestamp: %05ldms Callno: %5.5d DCall: %5.5d [%s:%d]\n", " Timestamp: %05dms Callno: %5.5d DCall: %5.5d [%s:%d]\n",
ntohl(fh->ts), ntohl(fh->ts),
(short)(ntohs(fh->callno) & ~AST_FLAG_FULL), (short) ntohs(fh->dcallno), (short)(ntohs(fh->callno) & ~AST_FLAG_FULL), (short) ntohs(fh->dcallno),
inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));

View File

@@ -35,8 +35,6 @@
#include <stdio.h> #include <stdio.h>
#ifdef __linux #ifdef __linux
#include <linux/soundcard.h> #include <linux/soundcard.h>
#elif defined(__FreeBSD__)
#include <machine/soundcard.h>
#else #else
#include <soundcard.h> #include <soundcard.h>
#endif #endif

View File

@@ -863,7 +863,6 @@ static void transmit_tone(struct skinnysession *s, int tone)
transmit_response(s, req); transmit_response(s, req);
} }
#if 0
static void transmit_selectsoftkeys(struct skinnysession *s, int instance, int callid, int softkey) static void transmit_selectsoftkeys(struct skinnysession *s, int instance, int callid, int softkey)
{ {
skinny_req *req; skinny_req *req;
@@ -882,7 +881,6 @@ static void transmit_selectsoftkeys(struct skinnysession *s, int instance, int c
req->data.selectsoftkey.softKeySetIndex = softkey; req->data.selectsoftkey.softKeySetIndex = softkey;
transmit_response(s, req); transmit_response(s, req);
} }
#endif
static void transmit_lamp_indication(struct skinnysession *s, int instance, int indication) static void transmit_lamp_indication(struct skinnysession *s, int instance, int indication)
{ {
@@ -2320,7 +2318,7 @@ static void *accept_thread(void *ignore)
for (;;) { for (;;) {
sinlen = sizeof(sin); sinlen = sizeof(sin);
as = accept(skinnysock, (struct sockaddr *)&sin, &sinlen); as = accept(skinnysock, &sin, &sinlen);
if (as < 0) { if (as < 0) {
ast_log(LOG_NOTICE, "Accept returned -1: %s\n", strerror(errno)); ast_log(LOG_NOTICE, "Accept returned -1: %s\n", strerror(errno));
continue; continue;
@@ -2395,7 +2393,7 @@ static int restart_monitor(void)
{ {
/* If we're supposed to be stopped -- stay stopped */ /* If we're supposed to be stopped -- stay stopped */
if (monitor_thread == (pthread_t)-2) if (monitor_thread == -2)
return 0; return 0;
if (ast_mutex_lock(&monlock)) { if (ast_mutex_lock(&monlock)) {
ast_log(LOG_WARNING, "Unable to lock monitor\n"); ast_log(LOG_WARNING, "Unable to lock monitor\n");

View File

@@ -64,7 +64,7 @@ static void dump_string(char *output, int maxlen, void *value, int len)
static void dump_int(char *output, int maxlen, void *value, int len) static void dump_int(char *output, int maxlen, void *value, int len)
{ {
if (len == sizeof(unsigned int)) if (len == sizeof(unsigned int))
snprintf(output, maxlen, "%ld", ntohl(*((unsigned int *)value))); snprintf(output, maxlen, "%d", ntohl(*((unsigned int *)value)));
else else
snprintf(output, maxlen, "Invalid INT"); snprintf(output, maxlen, "Invalid INT");
} }
@@ -287,7 +287,7 @@ snprintf(tmp, sizeof(tmp),
retries, fh->oseqno, fh->iseqno, class, subclass); retries, fh->oseqno, fh->iseqno, class, subclass);
outputf(tmp); outputf(tmp);
snprintf(tmp, sizeof(tmp), snprintf(tmp, sizeof(tmp),
" Timestamp: %05ldms SCall: %5.5d DCall: %5.5d [%s:%d]\n", " Timestamp: %05dms SCall: %5.5d DCall: %5.5d [%s:%d]\n",
ntohl(fh->ts), ntohl(fh->ts),
ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS, ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS,
inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));

View File

@@ -22,7 +22,6 @@ MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] && echo "codec_speex.so") MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] && echo "codec_speex.so")
MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so") MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
CFLAGS+=-fPIC CFLAGS+=-fPIC
CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
LIBG723=g723.1/libg723.a LIBG723=g723.1/libg723.a
LIBG723B=g723.1b/libg723b.a LIBG723B=g723.1b/libg723b.a
@@ -31,8 +30,7 @@ LIBGSM=$(shell if uname -m | grep -q 86; then echo gsm/lib/libgsm.a; else echo "
LIBGSMT=$(shell if uname -m | grep -q 86; then echo gsm/lib/libgsm.a; fi) LIBGSMT=$(shell if uname -m | grep -q 86; then echo gsm/lib/libgsm.a; fi)
LIBMP3=mp3/libmp3.a LIBMP3=mp3/libmp3.a
LIBLPC10=lpc10/liblpc10.a LIBLPC10=lpc10/liblpc10.a
LIBSPEEX=$(shell [ -f /usr/local/lib/libspeex.a ] && echo "-L/usr/local/lib") LIBSPEEX=-lspeex -lm
LIBSPEEX+=-lspeex -lm
LIBILBC=ilbc/libilbc.a LIBILBC=ilbc/libilbc.a
CODECS+=$(MODG723) $(MODSPEEX) $(MODILBC) codec_gsm.so codec_mp3_d.so codec_lpc10.so \ CODECS+=$(MODG723) $(MODSPEEX) $(MODILBC) codec_gsm.so codec_mp3_d.so codec_lpc10.so \

View File

@@ -1,14 +1,14 @@
/* /*
$Log$ $Log$
Revision 1.15 2003/10/16 10:44:04 markster Revision 1.16 2003/10/16 21:11:29 martinp
Sane FreeBSD patch Revert the previous patch since it's braking compilation
Revision 1.2 2003/10/16 10:44:04 markster Revision 1.3 2003/10/16 21:11:30 martinp
Sane FreeBSD patch Revert the previous patch since it's braking compilation
Revision 1.1.1.1 2003/02/12 13:59:15 matteo Revision 1.1 2003/02/12 13:59:15 matteo
mer feb 12 14:56:57 CET 2003 Initial revision
Revision 1.2 2000/01/05 08:20:39 markster Revision 1.2 2000/01/05 08:20:39 markster
Some OSS fixes and a few lpc changes to make it actually work Some OSS fixes and a few lpc changes to make it actually work
@@ -37,7 +37,7 @@ extern int lpcini_(void);
#include "f2c.h" #include "f2c.h"
#include <stdlib.h> #include <malloc.h>
/* Common Block Declarations */ /* Common Block Declarations */
@@ -51,14 +51,14 @@ struct {
/* ***************************************************************** */ /* ***************************************************************** */
/* $Log$ /* $Log$
* Revision 1.15 2003/10/16 10:44:04 markster * Revision 1.16 2003/10/16 21:11:29 martinp
* Sane FreeBSD patch * Revert the previous patch since it's braking compilation
* *
/* Revision 1.2 2003/10/16 10:44:04 markster /* Revision 1.3 2003/10/16 21:11:30 martinp
/* Sane FreeBSD patch /* Revert the previous patch since it's braking compilation
/* /*
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* Revision 1.1 2003/02/12 13:59:15 matteo
/* mer feb 12 14:56:57 CET 2003 /* Initial revision
/* /*
/* Revision 1.2 2000/01/05 08:20:39 markster /* Revision 1.2 2000/01/05 08:20:39 markster
/* Some OSS fixes and a few lpc changes to make it actually work /* Some OSS fixes and a few lpc changes to make it actually work
@@ -83,14 +83,14 @@ struct {
{ {
/* $Log$ /* $Log$
* Revision 1.15 2003/10/16 10:44:04 markster * Revision 1.16 2003/10/16 21:11:29 martinp
* Sane FreeBSD patch * Revert the previous patch since it's braking compilation
* *
/* Revision 1.2 2003/10/16 10:44:04 markster /* Revision 1.3 2003/10/16 21:11:30 martinp
/* Sane FreeBSD patch /* Revert the previous patch since it's braking compilation
/* /*
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* Revision 1.1 2003/02/12 13:59:15 matteo
/* mer feb 12 14:56:57 CET 2003 /* Initial revision
/* /*
/* Revision 1.2 2000/01/05 08:20:39 markster /* Revision 1.2 2000/01/05 08:20:39 markster
/* Some OSS fixes and a few lpc changes to make it actually work /* Some OSS fixes and a few lpc changes to make it actually work
@@ -115,14 +115,14 @@ struct {
/* LPC Configuration parameters: */ /* LPC Configuration parameters: */
/* Frame size, Prediction order, Pitch period */ /* Frame size, Prediction order, Pitch period */
/* $Log$ /* $Log$
* Revision 1.15 2003/10/16 10:44:04 markster * Revision 1.16 2003/10/16 21:11:29 martinp
* Sane FreeBSD patch * Revert the previous patch since it's braking compilation
* *
/* Revision 1.2 2003/10/16 10:44:04 markster /* Revision 1.3 2003/10/16 21:11:30 martinp
/* Sane FreeBSD patch /* Revert the previous patch since it's braking compilation
/* /*
/* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* Revision 1.1 2003/02/12 13:59:15 matteo
/* mer feb 12 14:56:57 CET 2003 /* Initial revision
/* /*
/* Revision 1.2 2000/01/05 08:20:39 markster /* Revision 1.2 2000/01/05 08:20:39 markster
/* Some OSS fixes and a few lpc changes to make it actually work /* Some OSS fixes and a few lpc changes to make it actually work

View File

@@ -37,13 +37,6 @@ ____________________________________________________________________________*/
/* #define GLOBAL_GAIN_SCALE 0 */ /* #define GLOBAL_GAIN_SCALE 0 */
#ifdef __FreeBSD__
#ifdef __i386__
#undef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1
#endif
#endif
#ifdef _M_IX86 #ifdef _M_IX86
#define LITTLE_ENDIAN 1 #define LITTLE_ENDIAN 1
#endif #endif