1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

BeOS patches by "shatty" <shatty at myrealbox.com>

1. errno's are negative on beos, so negating them gives positive values.
2. the -shared flag is -nostart on beos.
3. building the shared lib on beos requires -fomit-frame-pointer
4. beos doesn't have oss support

Originally committed as revision 779 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2002-07-19 22:23:40 +00:00
parent eddbd7e5a0
commit e1707f52d5
4 changed files with 52 additions and 2 deletions

41
berrno.h Normal file
View File

@ -0,0 +1,41 @@
#ifndef BERRNO_H
#define BERRNO_H
#include <Errors.h>
#ifdef ENOENT
#undef ENOENT
#endif
#define ENOENT 2
#ifdef EINTR
#undef EINTR
#endif
#define EINTR 4
#ifdef EIO
#undef EIO
#endif
#define EIO 5
#ifdef EAGAIN
#undef EAGAIN
#endif
#define EAGAIN 11
#ifdef ENOMEM
#undef ENOMEM
#endif
#define ENOMEM 12
#ifdef EINVAL
#undef EINVAL
#endif
#define EINVAL 22
#ifdef EPIPE
#undef EPIPE
#endif
#define EPIPE 32
#endif /* BERRNO_H */

7
configure vendored
View File

@ -52,6 +52,7 @@ extralibs="-lm"
simpleidct="yes" simpleidct="yes"
bigendian="no" bigendian="no"
mpegaudio_hp="yes" mpegaudio_hp="yes"
SHFLAGS=-shared
# OS specific # OS specific
targetos=`uname -s` targetos=`uname -s`
@ -59,7 +60,10 @@ case $targetos in
BeOS) BeOS)
prefix="/boot/home/config" prefix="/boot/home/config"
# helps building libavcodec # helps building libavcodec
CFLAGS="-O3 -DPIC" CFLAGS="-O3 -DPIC -fomit-frame-pointer"
SHFLAGS=-nostart
# disable linux things
audio_oss="no"
v4l="no" v4l="no"
# no need for libm, but the inet stuff # no need for libm, but the inet stuff
# Check for BONE # Check for BONE
@ -262,6 +266,7 @@ echo "AR=$ar" >> config.mak
echo "STRIP=$strip" >> config.mak echo "STRIP=$strip" >> config.mak
echo "OPTFLAGS=$CFLAGS" >> config.mak echo "OPTFLAGS=$CFLAGS" >> config.mak
echo "LDFLAGS=$LDFLAGS" >> config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak
echo "SHFLAGS=$SHFLAGS" >> config.mak
if test "$cpu" = "x86" ; then if test "$cpu" = "x86" ; then
echo "TARGET_ARCH_X86=yes" >> config.mak echo "TARGET_ARCH_X86=yes" >> config.mak
echo "#define ARCH_X86 1" >> $TMPH echo "#define ARCH_X86 1" >> $TMPH

View File

@ -85,7 +85,7 @@ $(LIB): $(OBJS)
$(AR) rc $@ $(OBJS) $(AR) rc $@ $(OBJS)
$(SLIB): $(OBJS) $(SLIB): $(OBJS)
$(CC) -shared -o $@ $(OBJS) $(EXTRALIBS) $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
dsputil.o: dsputil.c dsputil.h dsputil.o: dsputil.c dsputil.h

View File

@ -22,7 +22,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef __BEOS__
#include <errno.h> #include <errno.h>
#else
#include "berrno.h"
#endif
#include <math.h> #include <math.h>
#ifndef ENODATA #ifndef ENODATA