The following commit has been merged in the master branch:
commit c0449d31687544858ce6f2fa705945bcd4365eff
Author: Stephane Glondu <st...@glondu.net>
Date:   Thu Jul 28 13:19:36 2011 +0200

    Refresh patches

diff --git a/debian/patches/0001-Do-not-build-manual-manual.pdf.patch 
b/debian/patches/0001-Do-not-build-manual-manual.pdf.patch
index d25496f..05af968 100644
--- a/debian/patches/0001-Do-not-build-manual-manual.pdf.patch
+++ b/debian/patches/0001-Do-not-build-manual-manual.pdf.patch
@@ -7,10 +7,10 @@ Subject: Do not build manual/manual.pdf
  1 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/setup.ml b/setup.ml
-index c9e5217..069adc9 100644
+index 8e925d1..91ad1db 100644
 --- a/setup.ml
 +++ b/setup.ml
-@@ -5153,7 +5153,7 @@ let setup_t =
+@@ -5160,7 +5160,7 @@ let setup_t =
                   CustomPlugin.cmd_main =
                     [
                        (OASISExpr.EBool true,
@@ -19,7 +19,7 @@ index c9e5217..069adc9 100644
                     ];
                   cmd_clean = [(OASISExpr.EBool true, None)];
                   cmd_distclean = [(OASISExpr.EBool true, None)];
-@@ -5198,7 +5198,7 @@ let setup_t =
+@@ -5205,7 +5205,7 @@ let setup_t =
                   CustomPlugin.cmd_main =
                     [
                        (OASISExpr.EBool true,
@@ -28,7 +28,7 @@ index c9e5217..069adc9 100644
                     ];
                   cmd_clean = [(OASISExpr.EBool true, None)];
                   cmd_distclean = [(OASISExpr.EBool true, None)];
-@@ -5240,7 +5240,7 @@ let setup_t =
+@@ -5247,7 +5247,7 @@ let setup_t =
                   CustomPlugin.cmd_main =
                     [
                        (OASISExpr.EBool true,
diff --git a/debian/patches/0002-Fix-FTBFS-on-hurd.patch 
b/debian/patches/0002-Fix-FTBFS-on-hurd.patch
deleted file mode 100644
index 84044a0..0000000
--- a/debian/patches/0002-Fix-FTBFS-on-hurd.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From: Nicolas Dandrimont <nicolas.dandrim...@crans.org>
-Date: Fri, 27 May 2011 01:21:19 +0200
-Subject: Fix FTBFS on hurd
-
-This patch introduces a variable-size buffer for readlink and gethostname
----
- src/unix/lwt_unix_unix.c |   61 +++++++++++++++++++++++++++++++++++++++-------
- 1 files changed, 52 insertions(+), 9 deletions(-)
-
-diff --git a/src/unix/lwt_unix_unix.c b/src/unix/lwt_unix_unix.c
-index 85459ec..543dd0c 100644
---- a/src/unix/lwt_unix_unix.c
-+++ b/src/unix/lwt_unix_unix.c
-@@ -2328,8 +2328,8 @@ CAMLprim value lwt_unix_symlink_free(value val_job)
- struct job_readlink {
-   struct lwt_unix_job job;
-   char *name;
--  char buffer[MAXPATHLEN];
--  size_t result;
-+  char *buffer;
-+  ssize_t result;
-   int error_code;
- };
- 
-@@ -2337,8 +2337,32 @@ struct job_readlink {
- 
- static void worker_readlink(struct job_readlink *job)
- {
--  job->result = readlink(job->name, job->buffer, MAXPATHLEN);
--  job->error_code = errno;
-+
-+  ssize_t buffer_size = 1024;
-+  ssize_t link_length;
-+
-+  for (;;) {
-+
-+    job->buffer = lwt_unix_malloc(buffer_size);
-+
-+    link_length = readlink(job->name, job->buffer, buffer_size);
-+
-+    if (link_length < buffer_size) {
-+      if (link_length >= 0) {
-+        job->buffer = realloc(job->buffer, link_length + 1);
-+        job->buffer[link_length] = '\0';
-+      } else {
-+        free (job->buffer);
-+        job->buffer = NULL;
-+      }
-+      job->result = link_length;
-+      job->error_code = errno;
-+      break;
-+    } else {
-+      free(job->buffer);
-+      buffer_size *= 2;
-+    }
-+  }
- }
- 
- CAMLprim value lwt_unix_readlink_job(value val_name)
-@@ -2346,6 +2370,7 @@ CAMLprim value lwt_unix_readlink_job(value val_name)
-   struct job_readlink *job = lwt_unix_new(struct job_readlink);
-   job->job.worker = (lwt_unix_job_worker)worker_readlink;
-   job->name = lwt_unix_strdup(String_val(val_name));
-+  job->buffer = NULL;
-   return lwt_unix_alloc_job(&(job->job));
- }
- 
-@@ -2353,7 +2378,6 @@ CAMLprim value lwt_unix_readlink_result(value val_job)
- {
-   struct job_readlink *job = Job_readlink_val(val_job);
-   if (job->result < 0) unix_error(job->error_code, "readlink", Nothing);
--  job->buffer[job->result] = 0;
-   return caml_copy_string(job->buffer);
- }
- 
-@@ -2361,6 +2385,7 @@ CAMLprim value lwt_unix_readlink_free(value val_job)
- {
-   struct job_readlink *job = Job_readlink_val(val_job);
-   free(job->name);
-+  free(job->buffer);
-   lwt_unix_free_job(&job->job);
-   return Val_unit;
- }
-@@ -2698,7 +2723,7 @@ CAMLprim value lwt_unix_getgrgid_free(value val_job)
- 
- struct job_gethostname {
-   struct lwt_unix_job job;
--  char buffer[MAXHOSTNAMELEN];
-+  char *buffer;
-   int result;
-   int error_code;
- };
-@@ -2707,15 +2732,32 @@ struct job_gethostname {
- 
- static void worker_gethostname(struct job_gethostname *job)
- {
--  job->result = gethostname(job->buffer, MAXHOSTNAMELEN);
--  job->buffer[MAXHOSTNAMELEN - 1] = 0;
--  job->error_code = errno;
-+  int buffer_size = 64;
-+  int err;
-+
-+  for (;;) {
-+
-+    job->buffer = lwt_unix_malloc(buffer_size + 1);
-+
-+    err = gethostname(job->buffer, buffer_size);
-+
-+    if (err == -1 && errno == ENAMETOOLONG) {
-+      free(job->buffer);
-+      buffer_size *= 2;
-+    } else {
-+      job->buffer[buffer_size] = '\0';
-+      job->result = err;
-+      job->error_code = errno;
-+      break;
-+    }
-+  }
- }
- 
- CAMLprim value lwt_unix_gethostname_job()
- {
-   struct job_gethostname *job = lwt_unix_new(struct job_gethostname);
-   job->job.worker = (lwt_unix_job_worker)worker_gethostname;
-+  job->buffer = NULL;
-   return lwt_unix_alloc_job(&(job->job));
- }
- 
-@@ -2729,6 +2771,7 @@ CAMLprim value lwt_unix_gethostname_result(value val_job)
- CAMLprim value lwt_unix_gethostname_free(value val_job)
- {
-   struct job_gethostname *job = Job_gethostname_val(val_job);
-+  free(job->buffer);
-   lwt_unix_free_job(&job->job);
-   return Val_unit;
- }
--- 
diff --git a/debian/patches/0003-Fix-link-order-in-library-detection-test.patch 
b/debian/patches/0003-Fix-link-order-in-library-detection-test.patch
deleted file mode 100644
index ae6bd22..0000000
--- a/debian/patches/0003-Fix-link-order-in-library-detection-test.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Stephane Glondu <st...@glondu.net>
-Date: Wed, 15 Jun 2011 09:15:54 +0200
-Subject: Fix link order in library detection test
-
-The wrong link order was causing a build failure on Ubuntu, where the
-linker is stricter.
-
-Signed-off-by: Stephane Glondu <st...@glondu.net>
----
- discover.ml |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/discover.ml b/discover.ml
-index 09361a4..fbb6f63 100644
---- a/discover.ml
-+++ b/discover.ml
-@@ -163,9 +163,9 @@ let compile args stub_file =
-     Sys.command
-     "%s -custom %s %s %s %s 2> %s"
-     !ocamlc
--    args
-     c_args
-     (Filename.quote stub_file)
-+    args
-     (Filename.quote !caml_file)
-     (Filename.quote !log_file)
-   = 0
--- 
diff --git a/debian/patches/series b/debian/patches/series
index 087837e..97db22b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
 0001-Do-not-build-manual-manual.pdf.patch
-0002-Fix-FTBFS-on-hurd.patch
-0003-Fix-link-order-in-library-detection-test.patch

-- 
Cooperative light-weight thread library for OCaml

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to