summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-15 21:03:08 +0000
committerWez Furlong <wez@php.net>2002-03-15 21:03:08 +0000
commit0f65280cb5118d8c1a85db6626f7be365f3d1b26 (patch)
tree931b09acc5041eb771017e3ebf9ecb9aa833d722 /main/fopen_wrappers.h
parent3a1ebd4f519facbd7ec769304857aad40e49cf1c (diff)
downloadphp-git-0f65280cb5118d8c1a85db6626f7be365f3d1b26.tar.gz
New PHP streams...
Diffstat (limited to 'main/fopen_wrappers.h')
-rw-r--r--main/fopen_wrappers.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h
index dc28af9f47..24e60dcc00 100644
--- a/main/fopen_wrappers.h
+++ b/main/fopen_wrappers.h
@@ -27,12 +27,14 @@
#define IGNORE_URL 2
/* There's no USE_URL. */
#ifdef PHP_WIN32
-# define IGNORE_URL_WIN 2
+# define IGNORE_URL_WIN IGNORE_URL
#else
# define IGNORE_URL_WIN 0
#endif
#define ENFORCE_SAFE_MODE 4
+#define REPORT_ERRORS 8
+
#ifdef PHP_WIN32
# define SOCK_ERR INVALID_SOCKET
# define SOCK_CONN_ERR SOCKET_ERROR
@@ -42,22 +44,6 @@
# define SOCK_CONN_ERR -1
# define SOCK_RECV_ERR -1
#endif
-#define SOCK_WRITE(d, s) send(s, d, strlen(d), 0)
-#define SOCK_WRITEL(d, l, s) send(s, d, l, 0)
-#define SOCK_FGETC(s) php_sock_fgetc((s))
-#define SOCK_FGETS(b, l, s) php_sock_fgets((b), (l), (s))
-#define SOCK_FEOF(sock) php_sock_feof((sock))
-#define SOCK_FREAD(ptr, size, sock) php_sock_fread((ptr), (size), (sock))
-#define SOCK_FCLOSE(s) php_sock_close(s)
-
-#define FP_FGETS(buf, len, sock, fp, issock) \
- ((issock)?SOCK_FGETS(buf, len, sock):fgets(buf, len, fp))
-#define FP_FREAD(buf, len, sock, fp, issock) \
- ((issock)?SOCK_FREAD(buf, len, sock):fread(buf, 1, len, fp))
-#define FP_FEOF(sock, fp, issock) \
- ((issock)?SOCK_FEOF(sock):feof(fp))
-#define FP_FGETC(sock, fp, issock) \
- ((issock)?SOCK_FGETC(sock):fgetc(fp))
/* values for issock */
#define IS_NOT_SOCKET 0