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 CONFIG_FFSERVER
00059 #if !HAVE_POLL_H
00060 typedef unsigned long nfds_t;
00061
00062 struct pollfd {
00063 int fd;
00064 short events;
00065 short revents;
00066 };
00067
00068
00069 #define POLLIN 0x0001
00070 #define POLLOUT 0x0002
00071 #define POLLRDNORM POLLIN
00072 #define POLLWRNORM POLLOUT
00073 #define POLLRDBAND 0x0008
00074 #define POLLWRBAND 0x0010
00075 #define POLLPRI 0x0020
00076
00077
00078 #define POLLERR 0x0004
00079 #define POLLHUP 0x0080
00080 #define POLLNVAL 0x1000
00081
00082
00083 int poll(struct pollfd *fds, nfds_t numfds, int timeout);
00084 #endif
00085 #endif
00086 #endif
00087
00088 #endif