mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Fixes that make avilib compile on cygwin by Shailesh L Mistry <shailesh.mistry@milan.eclipse.co.uk>
This commit is contained in:
parent
74f92a5d68
commit
f87ad8e065
@ -29,14 +29,23 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
//SLM
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#define STDOUT_FILENO fileno(stdout)
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if defined(__bsdi__) || defined(__FreeBSD__)
|
||||
//SLM
|
||||
#if defined(__bsdi__) || defined(__FreeBSD__) || defined WIN32
|
||||
typedef off_t off64_t;
|
||||
#define lseek64 lseek
|
||||
#endif
|
||||
|
@ -25,6 +25,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
//SLM
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#define strncasecmp(a,b,c) _strnicmp(a,b,c)
|
||||
#endif
|
||||
|
||||
#include "avilib.h"
|
||||
//#include <time.h>
|
||||
|
||||
@ -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.
|
||||
|
@ -29,8 +29,18 @@
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
//SLM
|
||||
#ifdef WIN32
|
||||
#define uint16_t unsigned __int16
|
||||
#define uint32_t unsigned __int32
|
||||
#define uint64_t unsigned __int64
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -23,7 +23,13 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
//SLM
|
||||
#ifdef WIN32
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user