changeset 994:7701ff462e3a libavcodec

os2 support patch by ("Slavik Gnatenko" <miracle9 at newmail dot ru>)
author michaelni
date Sat, 11 Jan 2003 20:34:38 +0000
parents 895d3b01c6f4
children edc10966b081
files Makefile common.h
diffstat 2 files changed, 37 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Jan 11 04:54:38 2003 +0000
+++ b/Makefile	Sat Jan 11 20:34:38 2003 +0000
@@ -91,9 +91,9 @@
 SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S)
 OBJS := $(OBJS) $(ASM_OBJS)
 
-LIB= libavcodec.a
+LIB= $(LIBPREF)avcodec$(LIBSUF)
 ifeq ($(BUILD_SHARED),yes)
-SLIB= libavcodec.so
+SLIB= $(SLIBPREF)avcodec$(SLIBSUF)
 endif
 TESTS= imgresample-test dct-test motion-test fft-test
 
@@ -104,7 +104,9 @@
 $(LIB): $(OBJS)
 	rm -f $@
 	$(AR) rc $@ $(OBJS)
+ifneq ($(CONFIG_OS2),yes)
 	$(RANLIB) $@
+endif
 
 $(SLIB): $(OBJS)
 	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS)
--- a/common.h	Sat Jan 11 04:54:38 2003 +0000
+++ b/common.h	Sat Jan 11 20:34:38 2003 +0000
@@ -89,7 +89,38 @@
 
 #    define snprintf _snprintf
 
-#else /* CONFIG_WIN32 */
+/* CONFIG_WIN32 end */
+#elif defined (CONFIG_OS2)
+/* OS/2 EMX */
+
+#include <inttypes.h>
+
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned int UINT32;
+typedef unsigned long long UINT64;
+typedef signed char INT8;
+typedef signed short INT16;
+typedef signed int INT32;
+typedef signed long long INT64;
+
+#ifdef HAVE_AV_CONFIG_H
+
+#ifndef INT64_C
+#define INT64_C(c)     (c ## LL)
+#define UINT64_C(c)    (c ## ULL)
+#endif
+
+#ifdef USE_FASTMEMCPY
+#include "fastmemcpy.h"
+#endif
+
+#include <float.h>
+
+#endif /* HAVE_AV_CONFIG_H */
+
+/* CONFIG_OS2 end */
+#else
 
 /* unix */
 
@@ -119,7 +150,7 @@
 #        endif
 #    endif /* HAVE_AV_CONFIG_H */
 
-#endif /* !CONFIG_WIN32 */
+#endif /* !CONFIG_WIN32 && !CONFIG_OS2 */
 
 #ifdef HAVE_AV_CONFIG_H