summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlavik Gnatenko <miracle9@newmail.ru>2003-03-11 12:09:13 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-11 12:09:13 +0000
commit69db4e10f27abe4d3a7036d5cdb29e1f9745c7a4 (patch)
treecc6816441950e87fe37d22dc37ea1dd25e0995d6
parentdf99755bda623b8619476697d12eaab3f5af61c3 (diff)
restoring OS/2 compatibility patch by ("Slavik Gnatenko" <miracle9 at newmail dot ru>)
Originally committed as revision 1663 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure11
-rw-r--r--ffmpeg.c1
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavcodec/opts.c4
-rw-r--r--libavcodec/resample.c4
-rw-r--r--libavformat/Makefile2
6 files changed, 15 insertions, 9 deletions
diff --git a/configure b/configure
index 0bc2cc7e3c..79a9b3e577 100755
--- a/configure
+++ b/configure
@@ -188,10 +188,11 @@ LDFLAGS="$LDFLAGS -rdynamic"
;;
OS/2)
TMPE=$TMPE".exe"
-ar="emxomfar -p32"
-strip="echo ignore strip"
-CFLAGS="-Zomf"
-LDFLAGS="-Zomf -Zstack 16384"
+ar="emxomfar -p64"
+ranlib="echo ignoring ranlib"
+strip="echo ignoring strip"
+CFLAGS="-Zomf -O3"
+LDFLAGS="-Zomf -Zstack 16384 -s"
SHFLAGS=""
FFSLDFLAGS=""
LIBPREF=""
@@ -561,7 +562,7 @@ int main( void ) { return (int) FT_Init_FreeType(0); }
EOF
freetype2=no
-if test "x$targetos" != "xBeOS"; then
+if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
which freetype-config > /dev/null
if test $? -eq 0; then
if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
diff --git a/ffmpeg.c b/ffmpeg.c
index d97e951faa..602ce2a781 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/select.h>
#include <stdlib.h>
+#define usleep(t) _sleep2((t)/1000)
#endif
#include <time.h>
#include <ctype.h>
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index dd03125976..6fc214b848 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -125,9 +125,7 @@ tests: apiexample cpuid_test $(TESTS)
$(LIB): $(OBJS)
rm -f $@
$(AR) rc $@ $(OBJS)
-ifneq ($(CONFIG_OS2),yes)
$(RANLIB) $@
-endif
$(SLIB): $(OBJS)
$(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
diff --git a/libavcodec/opts.c b/libavcodec/opts.c
index 40a058de1a..5b643db287 100644
--- a/libavcodec/opts.c
+++ b/libavcodec/opts.c
@@ -12,6 +12,10 @@
#include "avcodec.h"
+#ifdef CONFIG_OS2
+#define strcasecmp(s1,s2) stricmp(s1,s2)
+#endif
+
const AVOption avoptions_common[] = {
AVOPTION_CODEC_FLAG("bit_exact", "use only bit-exact stuff", flags, CODEC_FLAG_BITEXACT, 0),
AVOPTION_CODEC_FLAG("mm_force", "force mm flags", dsp_mask, FF_MM_FORCE, 0),
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 209a00808d..ba2bb81da2 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -24,6 +24,10 @@
#include "avcodec.h"
+#if defined (CONFIG_OS2)
+#define floorf(n) floor(n)
+#endif
+
typedef struct {
/* fractional resampling */
uint32_t incr; /* fractional increment */
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 94de787bcb..a185e880ca 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -67,9 +67,7 @@ all: $(LIB)
$(LIB): $(OBJS) $(PPOBJS)
rm -f $@
$(AR) rc $@ $(OBJS) $(PPOBJS)
-ifneq ($(CONFIG_OS2),yes)
$(RANLIB) $@
-endif
depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend