00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVFORMAT_OS_SUPPORT_H
00023 #define AVFORMAT_OS_SUPPORT_H
00024
00030 #include "config.h"
00031
00032 #if defined(__MINGW32__) && !defined(__MINGW32CE__)
00033 # include <fcntl.h>
00034 # define lseek(f,p,w) _lseeki64((f), (p), (w))
00035 # define stat _stati64
00036 # define fstat(f,s) _fstati64((f), (s))
00037 #endif
00038
00039 static inline int is_dos_path(const char *path)
00040 {
00041 #if HAVE_DOS_PATHS
00042 if (path[0] && path[1] == ':')
00043 return 1;
00044 #endif
00045 return 0;
00046 }
00047
00048 #if CONFIG_NETWORK
00049 #if !HAVE_SOCKLEN_T
00050 typedef int socklen_t;
00051 #endif
00052
00053
00054 #if !HAVE_CLOSESOCKET
00055 #define closesocket close
00056 #endif
00057
00058 #if !HAVE_POLL_H
00059 typedef unsigned long nfds_t;
00060
00061 struct pollfd {
00062 int fd;
00063 short events;
00064 short revents;
00065 };
00066
00067
00068 #define POLLIN 0x0001
00069 #define POLLOUT 0x0002
00070 #define POLLRDNORM POLLIN
00071 #define POLLWRNORM POLLOUT
00072 #define POLLRDBAND 0x0008
00073 #define POLLWRBAND 0x0010
00074 #define POLLPRI 0x0020
00075
00076
00077 #define POLLERR 0x0004
00078 #define POLLHUP 0x0080
00079 #define POLLNVAL 0x1000
00080
00081
00082 int poll(struct pollfd *fds, nfds_t numfds, int timeout);
00083 #endif
00084 #endif
00085
00086 #endif