> lovely.  I am going to push it soon with some small adjustments.

That's good to hear.

There's one other small adjustment that you may want to make, see the attached patch. One of the WARC functions uses the basename function, which causes problems on OS X. Including libgen.h and strdup-ing the output of basename seems to solve this problem.

Thanks,

Gijs


Op 04-11-11 22:27 schreef Giuseppe Scrivano:
Gijs van Tulder<[email protected]>  writes:

Hi Giuseppe,

* I've changed the configure.ac and src/Makefile.am.
* I've added a ChangeLog entry.

lovely.  I am going to push it soon with some small adjustments.

Thanks for the great work.  Whenever it happens to be in the same place,
I'll buy you a beer :-)

Cheers,
Giuseppe

--- a/src/warc.c	2011-11-04 17:41:11.383704054 +0100
+++ b/src/warc.c	2011-11-04 23:06:28.693712714 +0100
@@ -19,6 +19,10 @@
 #include <uuid/uuid.h>
 #endif
 
+#ifndef WINDOWS
+#include <libgen.h>
+#endif
+
 #include "warc.h"
 
 extern char *version_string;
@@ -605,7 +609,7 @@
 
   char *filename_copy, *filename_basename;
   filename_copy = strdup (filename);
-  filename_basename = basename (filename_copy);
+  filename_basename = strdup (basename (filename_copy));
 
   warc_write_start_record ();
   warc_write_header ("WARC-Type", "warcinfo");
@@ -619,6 +623,7 @@
   if (warc_tmp == NULL)
     {
       free (filename_copy);
+      free (filename_basename);
       return false;
     }
 
@@ -646,6 +651,7 @@
     }
 
   free (filename_copy);
+  free (filename_basename);
   fclose (warc_tmp);
   return warc_write_ok;
 }

Reply via email to