Fix ETSI reference codec's patch for building on 64 bit architectures.

merged/ported to osmocom master by Harald Welte

Change-Id: I6b16811d4a3030dfce0718f0b1d266ee1761bfef
This commit is contained in:
Antonio Eugenio Burriel 2016-12-18 16:21:35 +01:00 committed by Harald Welte
parent 043cc0e506
commit 359ef6ba24
5 changed files with 37 additions and 56 deletions

View File

@ -1,26 +0,0 @@
Index: etsi/amr-code/makefile
===================================================================
--- etsi.orig/amr-code/makefile 2011-05-29 11:40:11.000000000 +0200
+++ etsi/amr-code/makefile 2011-05-29 11:40:17.000000000 +0200
@@ -21,7 +21,7 @@
CC=gcc
-CFLAGS = -g -I. -Wall
+CFLAGS = -g -I. -Wall -m32
SRCS1 = ccoder.c ccod_tet.c init_params.c sub_cc.c \
tetra_op.c
Index: etsi/c-code/makefile
===================================================================
--- etsi.orig/c-code/makefile 2011-05-29 11:40:02.000000000 +0200
+++ etsi/c-code/makefile 2011-05-29 11:40:07.000000000 +0200
@@ -23,7 +23,7 @@
CC=gcc
-CFLAGS = -I. -Wall
+CFLAGS = -I. -Wall -m32
SRCS1 = scoder.c scod_tet.c sub_sc_d.c \
sub_dsp.c fbas_tet.c fexp_tet.c \

View File

@ -0,0 +1,34 @@
diff -Nruw codec.orig/amr-code/source.h codec/amr-code/source.h
--- codec.orig/amr-code/source.h 2016-12-18 16:17:46.238404730 +0100
+++ codec/amr-code/source.h 2016-12-18 16:18:21.358545740 +0100
@@ -19,10 +19,11 @@
#ifndef TYPEDEF_H
#define TYPEDEF_H
+#include <stdint.h>
-typedef short Word16;
-typedef long Word32;
+typedef int16_t Word16;
+typedef int32_t Word32;
typedef int Flag;
#endif
diff -Nruw codec.orig/c-code/source.h codec/c-code/source.h
--- codec.orig/c-code/source.h 2016-12-18 16:17:46.242404746 +0100
+++ codec/c-code/source.h 2016-12-18 16:18:54.494678813 +0100
@@ -19,10 +19,11 @@
#ifndef TYPEDEF_H
#define TYPEDEF_H
+#include <stdint.h>
-typedef short Word16;
-typedef long Word32;
+typedef int16_t Word16;
+typedef int32_t Word32;
typedef int Flag;
#endif

View File

@ -1,26 +0,0 @@
diff -Nruw codec.orig/amr-code/makefile codec/amr-code/makefile
--- codec.orig/amr-code/makefile 2016-12-18 15:57:20.737366601 +0100
+++ codec/amr-code/makefile 2016-12-18 16:00:02.166031929 +0100
@@ -21,7 +21,7 @@
CC=gcc
-CFLAGS = -g -I. -Wall -m32
+CFLAGS = -g -I. -Wall -m32 -static
SRCS1 = ccoder.c ccod_tet.c init_params.c sub_cc.c \
tetra_op.c
diff -Nruw codec.orig/c-code/makefile codec/c-code/makefile
--- codec.orig/c-code/makefile 2016-12-18 15:57:20.737366601 +0100
+++ codec/c-code/makefile 2016-12-18 15:59:55.146002990 +0100
@@ -23,7 +23,7 @@
CC=gcc
-CFLAGS = -I. -Wall -m32
+CFLAGS = -I. -Wall -m32 -static
SRCS1 = scoder.c scod_tet.c sub_sc_d.c \
sub_dsp.c fbas_tet.c fexp_tet.c \
Binary files codec.orig/c-code/scoder and codec/c-code/scoder differ
Binary files codec.orig/c-code/sdecoder and codec/c-code/sdecoder differ

View File

@ -7,7 +7,7 @@ Index: etsi/amr-code/makefile
CC=gcc
-CFLAGS = -g -I.
+CFLAGS = -g -I. -Wall
+CFLAGS = -g -I. -Wall -O3
SRCS1 = ccoder.c ccod_tet.c init_params.c sub_cc.c \
tetra_op.c
@ -36,7 +36,7 @@ Index: etsi/c-code/makefile
+CC=gcc
-CFLAGS = -I.
+CFLAGS = -I. -Wall
+CFLAGS = -I. -Wall -O3
SRCS1 = scoder.c scod_tet.c sub_sc_d.c \
sub_dsp.c fbas_tet.c fexp_tet.c \

View File

@ -1,6 +1,5 @@
makefile-cleanups.patch
build_as_32bit.patch
link_static.patch
fix_64bit.patch
round_private.patch
filename-case.patch
log_stderr.patch