rename struct FILE to FILEPROTO, to prevent it from causing trouble with
the plain old FILE typedef.
This commit is contained in:
Родитель
533519cc9c
Коммит
e2f7030202
|
@ -95,18 +95,17 @@
|
||||||
CURLcode Curl_file_connect(struct connectdata *conn)
|
CURLcode Curl_file_connect(struct connectdata *conn)
|
||||||
{
|
{
|
||||||
char *real_path = curl_unescape(conn->path, 0);
|
char *real_path = curl_unescape(conn->path, 0);
|
||||||
struct FILE *file;
|
struct FILEPROTO *file;
|
||||||
int fd;
|
int fd;
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if defined(WIN32) || defined(__EMX__)
|
||||||
int i;
|
int i;
|
||||||
char *actual_path;
|
char *actual_path;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
file = (struct FILE *)malloc(sizeof(struct FILE));
|
file = (struct FILEPROTO *)calloc(sizeof(struct FILEPROTO), 1);
|
||||||
if(!file)
|
if(!file)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
|
||||||
memset(file, 0, sizeof(struct FILE));
|
|
||||||
conn->proto.file = file;
|
conn->proto.file = file;
|
||||||
|
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if defined(WIN32) || defined(__EMX__)
|
||||||
|
|
|
@ -267,7 +267,7 @@ struct FTP {
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* FILE unique setup
|
* FILE unique setup
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
struct FILE {
|
struct FILEPROTO {
|
||||||
int fd; /* open file descriptor to read from! */
|
int fd; /* open file descriptor to read from! */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ struct connectdata {
|
||||||
struct HTTP *gopher; /* alias, just for the sake of being more readable */
|
struct HTTP *gopher; /* alias, just for the sake of being more readable */
|
||||||
struct HTTP *https; /* alias, just for the sake of being more readable */
|
struct HTTP *https; /* alias, just for the sake of being more readable */
|
||||||
struct FTP *ftp;
|
struct FTP *ftp;
|
||||||
struct FILE *file;
|
struct FILEPROTO *file;
|
||||||
void *telnet; /* private for telnet.c-eyes only */
|
void *telnet; /* private for telnet.c-eyes only */
|
||||||
#if 0 /* no need for special ones for these: */
|
#if 0 /* no need for special ones for these: */
|
||||||
struct LDAP *ldap;
|
struct LDAP *ldap;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче