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 defined(_WIN32) && !defined(__MINGW32CE__)
00049 int ff_win32_open(const char *filename, int oflag, int pmode);
00050 #define open ff_win32_open
00051 #endif
00052 
00053 #if CONFIG_NETWORK
00054 #if !HAVE_SOCKLEN_T
00055 typedef int socklen_t;
00056 #endif
00057 
00058 
00059 #if !HAVE_CLOSESOCKET
00060 #define closesocket close
00061 #endif
00062 
00063 #if !HAVE_POLL_H
00064 typedef unsigned long nfds_t;
00065 
00066 struct pollfd {
00067     int fd;
00068     short events;  
00069     short revents; 
00070 };
00071 
00072 
00073 #define POLLIN     0x0001  
00074 #define POLLOUT    0x0002  
00075 #define POLLRDNORM POLLIN
00076 #define POLLWRNORM POLLOUT
00077 #define POLLRDBAND 0x0008  
00078 #define POLLWRBAND 0x0010  
00079 #define POLLPRI    0x0020  
00080 
00081 
00082 #define POLLERR    0x0004  
00083 #define POLLHUP    0x0080  
00084 #define POLLNVAL   0x1000  
00085 
00086 
00087 int poll(struct pollfd *fds, nfds_t numfds, int timeout);
00088 #endif 
00089 #endif 
00090 
00091 #endif