summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--berrno.h41
-rwxr-xr-xconfigure7
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavcodec/common.h4
4 files changed, 52 insertions, 2 deletions
diff --git a/berrno.h b/berrno.h
new file mode 100644
index 0000000000..f343706caf
--- /dev/null
+++ b/berrno.h
@@ -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 */
diff --git a/configure b/configure
index 7b4750c87e..60c56b3b00 100755
--- a/configure
+++ b/configure
@@ -52,6 +52,7 @@ extralibs="-lm"
simpleidct="yes"
bigendian="no"
mpegaudio_hp="yes"
+SHFLAGS=-shared
# OS specific
targetos=`uname -s`
@@ -59,7 +60,10 @@ case $targetos in
BeOS)
prefix="/boot/home/config"
# helps building libavcodec
-CFLAGS="-O3 -DPIC"
+CFLAGS="-O3 -DPIC -fomit-frame-pointer"
+SHFLAGS=-nostart
+# disable linux things
+audio_oss="no"
v4l="no"
# no need for libm, but the inet stuff
# Check for BONE
@@ -262,6 +266,7 @@ echo "AR=$ar" >> config.mak
echo "STRIP=$strip" >> config.mak
echo "OPTFLAGS=$CFLAGS" >> config.mak
echo "LDFLAGS=$LDFLAGS" >> config.mak
+echo "SHFLAGS=$SHFLAGS" >> config.mak
if test "$cpu" = "x86" ; then
echo "TARGET_ARCH_X86=yes" >> config.mak
echo "#define ARCH_X86 1" >> $TMPH
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6d54abb953..989381d882 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -85,7 +85,7 @@ $(LIB): $(OBJS)
$(AR) rc $@ $(OBJS)
$(SLIB): $(OBJS)
- $(CC) -shared -o $@ $(OBJS) $(EXTRALIBS)
+ $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
dsputil.o: dsputil.c dsputil.h
diff --git a/libavcodec/common.h b/libavcodec/common.h
index d9e46cabd3..e25e26651c 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -22,7 +22,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifndef __BEOS__
#include <errno.h>
+#else
+#include "berrno.h"
+#endif
#include <math.h>
#ifndef ENODATA