123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef FLOCK_COMPAT_H
- #define FLOCK_COMPAT_H
- PHPAPI int php_flock(int fd, int operation);
- #ifndef HAVE_FLOCK
- # define LOCK_SH 1
- # define LOCK_EX 2
- # define LOCK_NB 4
- # define LOCK_UN 8
- PHPAPI int flock(int fd, int operation);
- #endif
- #define PHP_LOCK_SH 1
- #define PHP_LOCK_EX 2
- #define PHP_LOCK_UN 3
- #define PHP_LOCK_NB 4
- #ifdef PHP_WIN32
- # ifdef EWOULDBLOCK
- # undef EWOULDBLOCK
- # endif
- # define EWOULDBLOCK WSAEWOULDBLOCK
- # define fsync _commit
- # define ftruncate(a, b) chsize(a, b)
- #endif
- #if !HAVE_INET_ATON
- #if HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #if HAVE_ARPA_INET_H
- #include <arpa/inet.h>
- #endif
- #ifndef PHP_WIN32
- extern int inet_aton(const char *, struct in_addr *);
- #endif
- #endif
- #endif
|