]> granicus.if.org Git - curl/commitdiff
rename struct FILE to FILEPROTO, to prevent it from causing trouble with
authorDaniel Stenberg <daniel@haxx.se>
Wed, 3 Mar 2004 09:25:59 +0000 (09:25 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 3 Mar 2004 09:25:59 +0000 (09:25 +0000)
the plain old FILE typedef.

lib/file.c
lib/urldata.h

index dcf59d06e90a7fc623b1a39c8991cc08cc324101..e10fa8108ae168ccf284e1e3b4704506564e623d 100644 (file)
 CURLcode Curl_file_connect(struct connectdata *conn)
 {
   char *real_path = curl_unescape(conn->path, 0);
-  struct FILE *file;
+  struct FILEPROTO *file;
   int fd;
 #if defined(WIN32) || defined(__EMX__)
   int i;
   char *actual_path;
 #endif
 
-  file = (struct FILE *)malloc(sizeof(struct FILE));
+  file = (struct FILEPROTO *)calloc(sizeof(struct FILEPROTO), 1);
   if(!file)
     return CURLE_OUT_OF_MEMORY;
 
-  memset(file, 0, sizeof(struct FILE));
   conn->proto.file = file;
 
 #if defined(WIN32) || defined(__EMX__)
index 821a0c37ea43a26bbe44283de8e645080b0b6eb5..85d9fca2ec3859b40897de61f8e3b49358e5aae4 100644 (file)
@@ -267,7 +267,7 @@ struct FTP {
 /****************************************************************************
  * FILE unique setup
  ***************************************************************************/
-struct FILE {
+struct FILEPROTO {
   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 *https;  /* alias, just for the sake of being more readable */
     struct FTP *ftp;
-    struct FILE *file;
+    struct FILEPROTO *file;
     void *telnet;        /* private for telnet.c-eyes only */
 #if 0 /* no need for special ones for these: */
     struct LDAP *ldap;