summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.h
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>1999-06-15 21:51:00 +0000
committerStig Bakken <ssb@php.net>1999-06-15 21:51:00 +0000
commit8c4411b5da9bf6385e35ad8c0a835f6ffe656203 (patch)
tree54e58e0c570cf771d2986520d5045f62299ab58d /main/fopen_wrappers.h
parentf86fb810a022d9490cb96e63993a14c5236d9f7d (diff)
downloadphp-git-8c4411b5da9bf6385e35ad8c0a835f6ffe656203.tar.gz
* reverse fsock/string import patches
Diffstat (limited to 'main/fopen_wrappers.h')
-rw-r--r--main/fopen_wrappers.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/main/fopen_wrappers.h b/main/fopen_wrappers.h
index c078940e36..c1e1420b3c 100644
--- a/main/fopen_wrappers.h
+++ b/main/fopen_wrappers.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+ | Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
+----------------------------------------------------------------------+
| This program is free software; you can redistribute it and/or modify |
| it under the terms of one of the following licenses: |
@@ -46,18 +46,17 @@
# define SOCK_ERR INVALID_SOCKET
# define SOCK_CONN_ERR SOCKET_ERROR
# define SOCK_RECV_ERR SOCKET_ERROR
+# define SOCK_FCLOSE(s) closesocket(s)
#else
# define SOCK_ERR -1
# define SOCK_CONN_ERR -1
# define SOCK_RECV_ERR -1
+# define SOCK_FCLOSE(s) close(s)
#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) _php3_sock_fgetc((s))
+#define SOCK_FGETC(c,s) recv(s,c,1,0)
#define SOCK_FGETS(b,l,s) _php3_sock_fgets((b),(l),(s))
-#define SOCK_FEOF(sock) _php3_sock_feof((sock))
-#define SOCK_FREAD(ptr,size,sock) _php3_sock_fread((ptr),(size),(sock))
-#define SOCK_FCLOSE(s) _php3_sock_close(s)
/* values for issock */
#define IS_NOT_SOCKET 0
@@ -70,15 +69,15 @@ extern int wsa_fp; /* a list for open sockets */
extern PHPAPI FILE *php3_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd);
-extern FILE *php3_fopen_for_parser(void);
+PHPAPI FILE *php3_fopen_for_parser(void);
extern PHPAPI int _php3_check_open_basedir(char *path);
-extern PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path);
extern PHPAPI FILE *php3_fopen_with_path(char *filename, char *mode, char *path, char **opened_path);
extern PHPAPI int php3_isurl(char *path);
extern PHPAPI char *php3_strip_url_passwd(char *path);
+extern PHPAPI int php3_write(void *buf, int size);
extern PHPAPI char *expand_filepath(char *filepath);