summaryrefslogtreecommitdiff
path: root/ext/standard/file.h
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-01-13 13:59:22 +0000
committerZeev Suraski <zeev@php.net>2001-01-13 13:59:22 +0000
commit86624dfad95f3671ff5545ab5e164bb5a4d8aadb (patch)
treed55577043d72caab0d91ee05164e32ad12463603 /ext/standard/file.h
parent93f4fa8d730ba082a73ec0040a71e48311b5cecf (diff)
downloadphp-git-86624dfad95f3671ff5545ab5e164bb5a4d8aadb.tar.gz
- Fix exec() bug
- Merge fsock and file globals
Diffstat (limited to 'ext/standard/file.h')
-rw-r--r--ext/standard/file.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/standard/file.h b/ext/standard/file.h
index cc2fe08cbc..4559a322a0 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -72,4 +72,32 @@ PHPAPI int php_file_le_popen(void);
PHPAPI int php_file_le_socket(void);
PHPAPI int php_copy_file(char *src, char *dest);
+typedef struct {
+ int fgetss_state;
+ int pclose_ret;
+ HashTable ht_fsock_keys;
+ HashTable ht_fsock_socks;
+ struct php_sockbuf *phpsockbuf;
+ size_t def_chunk_size;
+} php_file_globals;
+
+#ifdef ZTS
+#define FLS_D php_file_globals *file_globals
+#define FLS_DC , FLS_D
+#define FLS_C file_globals
+#define FLS_CC , FLS_C
+#define FG(v) (file_globals->v)
+#define FLS_FETCH() php_file_globals *file_globals = ts_resource(file_globals_id)
+extern int file_globals_id;
+#else
+#define FLS_D void
+#define FLS_DC
+#define FLS_C
+#define FLS_CC
+#define FG(v) (file_globals.v)
+#define FLS_FETCH()
+extern php_file_globals file_globals;
+#endif
+
+
#endif /* FILE_H */