Mercurial > libavformat.hg
changeset 22:65433f1b2549 libavformat
os2 support patch by ("Slavik Gnatenko" <miracle9 at newmail dot ru>)
author | michaelni |
---|---|
date | Sat, 11 Jan 2003 20:34:38 +0000 |
parents | 3d2d2f8725f9 |
children | f6aae828c320 |
files | Makefile file.c img.c utils.c |
diffstat | 4 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sat Jan 11 05:33:35 2003 +0000 +++ b/Makefile Sat Jan 11 20:34:38 2003 +0000 @@ -48,14 +48,16 @@ OBJS+= ogg.o endif -LIB= libavformat.a +LIB= $(LIBPREF)avformat$(LIBSUF) all: $(LIB) $(LIB): $(OBJS) rm -f $@ $(AR) rc $@ $(OBJS) +ifneq ($(CONFIG_OS2),yes) $(RANLIB) $@ +endif installlib: all install -m 644 $(LIB) $(prefix)/lib @@ -73,4 +75,4 @@ g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< clean: - rm -f *.o *~ *.a + rm -f *.o *~ *.a $(LIB)
--- a/file.c Sat Jan 11 05:33:35 2003 +0000 +++ b/file.c Sat Jan 11 20:34:38 2003 +0000 @@ -42,7 +42,7 @@ } else { access = O_RDONLY; } -#ifdef CONFIG_WIN32 +#if defined(CONFIG_WIN32) || defined(CONFIG_OS2) access |= O_BINARY; #endif fd = open(filename, access, 0666);
--- a/img.c Sat Jan 11 05:33:35 2003 +0000 +++ b/img.c Sat Jan 11 20:34:38 2003 +0000 @@ -26,9 +26,13 @@ #ifdef __BEOS__ # ifndef usleep # include <OS.h> -# define usleep(t) snooze((bigtime_t)(t)) +# define usleep(t) snooze((bigtime_t)(t)) # endif #endif +#if defined(CONFIG_OS2) +# include <stdlib.h> +# define usleep(t) _sleep2((t) / 1000) +#endif typedef struct { int width;
--- a/utils.c Sat Jan 11 05:33:35 2003 +0000 +++ b/utils.c Sat Jan 11 20:34:38 2003 +0000 @@ -18,14 +18,18 @@ */ #include "avformat.h" #include <ctype.h> -#ifndef CONFIG_WIN32 +#ifdef CONFIG_WIN32 +#define strcasecmp _stricmp +#include <sys/types.h> +#include <sys/timeb.h> +#elif defined(CONFIG_OS2) +#include <string.h> +#define strcasecmp stricmp +#include <sys/time.h> +#else #include <unistd.h> #include <fcntl.h> #include <sys/time.h> -#else -#define strcasecmp _stricmp -#include <sys/types.h> -#include <sys/timeb.h> #endif #include <time.h> @@ -362,7 +366,7 @@ } /* XXX: suppress this hack for redirectors */ -#ifndef __MINGW32__ +#ifdef CONFIG_NETWORK if (fmt == &redir_demux) { err = redir_open(ic_ptr, &ic->pb); url_fclose(&ic->pb);