summaryrefslogtreecommitdiff
path: root/ext/standard/flock_compat.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-21 19:01:38 +0000
committerZeev Suraski <zeev@php.net>1999-04-21 19:01:38 +0000
commit751709a469d4b878edb714a158affa8ca6d6abc0 (patch)
treeb101ee2de589eab1a94de38c38ab96063890e512 /ext/standard/flock_compat.h
parent065636be85aae0602a6255642e031ab62966dd90 (diff)
downloadphp-git-751709a469d4b878edb714a158affa8ca6d6abc0.tar.gz
* Rename php_compat.[ch] to flock_compat.[ch] and move it to ext/standard
* Fix Win32 compilation
Diffstat (limited to 'ext/standard/flock_compat.h')
-rw-r--r--ext/standard/flock_compat.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h
new file mode 100644
index 0000000000..9478fef776
--- /dev/null
+++ b/ext/standard/flock_compat.h
@@ -0,0 +1,21 @@
+#ifndef _FLOCK_COMPAT_H
+#define _FLOCK_COMPAT_H
+
+#if !HAVE_FLOCK
+# define LOCK_SH 1
+# define LOCK_EX 2
+# define LOCK_NB 4
+# define LOCK_UN 8
+int flock(int fd, int operation);
+#endif
+
+#if WIN32|WINNT
+# define fsync _commit
+# define ftruncate chsize
+#endif /* WIN32|WINNT */
+
+#if !HAVE_INET_ATON
+extern int inet_aton(const char *, struct in_addr *);
+#endif
+
+#endif /* _FLOCK_COMPAT_H */