diff --git a/avilib/avidump.c b/avilib/avidump.c index 6cfaab3bd..202b52a7a 100644 --- a/avilib/avidump.c +++ b/avilib/avidump.c @@ -29,14 +29,23 @@ #include #include #include + +//SLM +#ifdef WIN32 +#include +#define STDOUT_FILENO fileno(stdout) +#else #include +#endif + #include #include #include #include #include -#if defined(__bsdi__) || defined(__FreeBSD__) +//SLM +#if defined(__bsdi__) || defined(__FreeBSD__) || defined WIN32 typedef off_t off64_t; #define lseek64 lseek #endif diff --git a/avilib/avilib.c b/avilib/avilib.c index fbe85e25f..528e3ea24 100644 --- a/avilib/avilib.c +++ b/avilib/avilib.c @@ -25,6 +25,12 @@ * */ +//SLM +#ifdef WIN32 +#include +#define strncasecmp(a,b,c) _strnicmp(a,b,c) +#endif + #include "avilib.h" //#include @@ -39,6 +45,12 @@ static char id_str[MAX_INFO_STRLEN]; #define FRAME_RATE_SCALE 1000000 +//SLM +/* ssize_t not defined in vc6 */ +#if !defined(ssize_t) +typedef int ssize_t; +#endif + /******************************************************************* * * * Utilities for writing an AVI File * @@ -191,6 +203,22 @@ static int avi_add_index_entry(avi_t *AVI, unsigned char *tag, long flags, unsig return 0; } +//SLM +#ifndef S_IRUSR +#define S_IRWXU 00700 /* read, write, execute: owner */ +#define S_IRUSR 00400 /* read permission: owner */ +#define S_IWUSR 00200 /* write permission: owner */ +#define S_IXUSR 00100 /* execute permission: owner */ +#define S_IRWXG 00070 /* read, write, execute: group */ +#define S_IRGRP 00040 /* read permission: group */ +#define S_IWGRP 00020 /* write permission: group */ +#define S_IXGRP 00010 /* execute permission: group */ +#define S_IRWXO 00007 /* read, write, execute: other */ +#define S_IROTH 00004 /* read permission: other */ +#define S_IWOTH 00002 /* write permission: other */ +#define S_IXOTH 00001 /* execute permission: other */ +#endif + /* AVI_open_output_file: Open an AVI File and write a bunch of zero bytes as space for the header. diff --git a/avilib/avilib.h b/avilib/avilib.h index 836c0110f..e48d996ff 100644 --- a/avilib/avilib.h +++ b/avilib/avilib.h @@ -29,8 +29,18 @@ #include #include #include + +//SLM +#ifdef WIN32 +#define uint16_t unsigned __int16 +#define uint32_t unsigned __int32 +#define uint64_t unsigned __int64 +#else #include #include +#endif + + #include #include #include diff --git a/avilib/avimisc.c b/avilib/avimisc.c index 2dfeb4bfd..512419211 100644 --- a/avilib/avimisc.c +++ b/avilib/avimisc.c @@ -23,7 +23,13 @@ #include #include + +//SLM +#ifdef WIN32 +#else #include +#endif + #include #include