diff options
| author | Sascha Schumann <sas@php.net> | 1999-04-21 17:11:01 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 1999-04-21 17:11:01 +0000 |
| commit | dcc16af80cac7a2273aba9f0d7601392280d2185 (patch) | |
| tree | 2ccc21a47b02e2f5309173528a297adb8306b5fc /main/php_compat.h | |
| parent | a6e4ef3e31629a4060dffb1fcc3153b1854d4f7b (diff) | |
| download | php-git-dcc16af80cac7a2273aba9f0d7601392280d2185.tar.gz | |
port some fixes, add compat routines
Diffstat (limited to 'main/php_compat.h')
| -rw-r--r-- | main/php_compat.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/php_compat.h b/main/php_compat.h new file mode 100644 index 0000000000..2c4aa3e0bf --- /dev/null +++ b/main/php_compat.h @@ -0,0 +1,39 @@ +#ifndef PHP_COMPAT_H +#define PHP_COMPAT_H + +#if (WIN32|WINNT) & HAVE_BINDLIB +#ifndef WINNT +#define WINNT 1 +#endif +#include "arpa/inet.h" +#include "netdb.h" +#include "arpa/nameser.h" +#include "resolv.h" +#endif + +#if !HAVE_FLOCK + +#define LOCK_SH 1 +#define LOCK_EX 2 +#define LOCK_NB 4 +#define LOCK_UN 8 + +extern PHPAPI int flock(int fd, int operation); + +#endif + +#if WIN32|WINNT + +/* These were in win32/flock.h, dunno if they are really needed + (or maybe break something) */ + +#define fsync _commit +#define ftruncate chsize + +#endif /* WIN32|WINNT */ + +#if !HAVE_INET_ATON +extern PHPAPI int inet_aton(const char *, struct in_addr *); +#endif + +#endif |
