bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Re: new alpha tarball wget-1.12-2392.tar.bz2


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] Re: new alpha tarball wget-1.12-2392.tar.bz2
Date: Fri, 09 Jul 2010 12:12:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hi,

thanks for the report.  I have changed this function name to don't clash
with the gnulib module (that is used by gnutls).

I have attached a patch, can you try it?

Cheers,
Giuseppe



Ploni Almoni <address@hidden> writes:

> D:/Documents/username/Msys/home/username/usr/lib\libgnutls.a(read-file.o):
> In function `read_file':
> D:\Documents\username\Msys\home\username\usr\src\gnutls-2.10.0\lib\gl/read-file.c:121:
> multiple definition of `read_file'
> utils.o:utils.c:(.text+0xd70): first defined here
> collect2: ld returned 1 exit status



=== modified file 'src/convert.c'
--- src/convert.c       2010-05-08 19:56:15 +0000
+++ src/convert.c       2010-07-09 09:36:02 +0000
@@ -228,7 +228,7 @@
       }
   }
 
-  fm = read_file (file);
+  fm = wget_read_file (file);
   if (!fm)
     {
       logprintf (LOG_NOTQUIET, _("Cannot convert links in %s: %s\n"),
@@ -248,7 +248,7 @@
     {
       logprintf (LOG_NOTQUIET, _("Unable to delete %s: %s\n"),
                  quote (file), strerror (errno));
-      read_file_free (fm);
+      wget_read_file_free (fm);
       return;
     }
   /* Now open the file for writing.  */
@@ -257,7 +257,7 @@
     {
       logprintf (LOG_NOTQUIET, _("Cannot convert links in %s: %s\n"),
                  file, strerror (errno));
-      read_file_free (fm);
+      wget_read_file_free (fm);
       return;
     }
 
@@ -342,7 +342,7 @@
   if (p - fm->content < fm->length)
     fwrite (p, 1, fm->length - (p - fm->content), fp);
   fclose (fp);
-  read_file_free (fm);
+  wget_read_file_free (fm);
 
   logprintf (LOG_VERBOSE, "%d-%d\n", to_file_count, to_url_count);
 }

=== modified file 'src/css-url.c'
--- src/css-url.c       2010-05-08 19:56:15 +0000
+++ src/css-url.c       2010-07-09 09:36:02 +0000
@@ -252,7 +252,7 @@
   struct map_context ctx;
 
   /* Load the file. */
-  fm = read_file (file);
+  fm = wget_read_file (file);
   if (!fm)
     {
       logprintf (LOG_NOTQUIET, "%s: %s\n", file, strerror (errno));
@@ -268,6 +268,6 @@
   ctx.nofollow = 0;
 
   get_urls_css (&ctx, 0, fm->length);
-  read_file_free (fm);
+  wget_read_file_free (fm);
   return ctx.head;
 }

=== modified file 'src/html-url.c'
--- src/html-url.c      2010-05-08 19:56:15 +0000
+++ src/html-url.c      2010-07-09 09:36:02 +0000
@@ -659,7 +659,7 @@
   int flags;
 
   /* Load the file. */
-  fm = read_file (file);
+  fm = wget_read_file (file);
   if (!fm)
     {
       logprintf (LOG_NOTQUIET, "%s: %s\n", file, strerror (errno));
@@ -701,7 +701,7 @@
     *meta_disallow_follow = ctx.nofollow;
 
   xfree_null (ctx.base);
-  read_file_free (fm);
+  wget_read_file_free (fm);
   return ctx.head;
 }
 
@@ -716,7 +716,7 @@
   const char *text, *text_end;
 
   /* Load the file.  */
-  fm = read_file (file);
+  fm = wget_read_file (file);
   if (!fm)
     {
       logprintf (LOG_NOTQUIET, "%s: %s\n", file, strerror (errno));
@@ -786,7 +786,7 @@
         tail->next = entry;
       tail = entry;
     }
-  read_file_free (fm);
+  wget_read_file_free (fm);
   return head;
 }
 

=== modified file 'src/res.c'
--- src/res.c   2010-05-08 19:56:15 +0000
+++ src/res.c   2010-07-09 09:36:02 +0000
@@ -385,7 +385,7 @@
 res_parse_from_file (const char *filename)
 {
   struct robot_specs *specs;
-  struct file_memory *fm = read_file (filename);
+  struct file_memory *fm = wget_read_file (filename);
   if (!fm)
     {
       logprintf (LOG_NOTQUIET, _("Cannot open %s: %s"),
@@ -393,7 +393,7 @@
       return NULL;
     }
   specs = res_parse (fm->content, fm->length);
-  read_file_free (fm);
+  wget_read_file_free (fm);
   return specs;
 }
 

=== modified file 'src/utils.c'
--- src/utils.c 2010-05-08 19:56:15 +0000
+++ src/utils.c 2010-07-09 09:36:02 +0000
@@ -1149,7 +1149,7 @@
    zero-terminated, and you should *not* read or write beyond the [0,
    length) range of characters.
 
-   After you are done with the file contents, call read_file_free to
+   After you are done with the file contents, call wget_read_file_free to
    release the memory.
 
    Depending on the operating system and the type of file that is
@@ -1160,7 +1160,7 @@
    If you want to read from a real file named "-", use "./-" instead.  */
 
 struct file_memory *
-read_file (const char *file)
+wget_read_file (const char *file)
 {
   int fd;
   struct file_memory *fm;
@@ -1270,7 +1270,7 @@
    memory needed to hold the FM structure itself.  */
 
 void
-read_file_free (struct file_memory *fm)
+wget_read_file_free (struct file_memory *fm)
 {
 #ifdef HAVE_MMAP
   if (fm->mmap_p)

=== modified file 'src/utils.h'
--- src/utils.h 2010-05-08 19:56:15 +0000
+++ src/utils.h 2010-07-09 09:36:02 +0000
@@ -97,8 +97,8 @@
 bool has_html_suffix_p (const char *);
 
 char *read_whole_line (FILE *);
-struct file_memory *read_file (const char *);
-void read_file_free (struct file_memory *);
+struct file_memory *wget_read_file (const char *);
+void wget_read_file_free (struct file_memory *);
 
 void free_vec (char **);
 char **merge_vecs (char **, char **);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]