monotone-commits-diffs
[Top][All Lists]
Advanced

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

[Monotone-commits-diffs] org.debian.monotone: 480a9a17e2c4e8025a5428c499


From: code
Subject: [Monotone-commits-diffs] org.debian.monotone: 480a9a17e2c4e8025a5428c4991a7c29e8e8b2d3
Date: Mon, 11 Mar 2013 21:53:59 +0100 (CET)

revision:            480a9a17e2c4e8025a5428c4991a7c29e8e8b2d3
date:                2012-03-27T11:44:41
author:              Francis Russell <address@hidden>
branch:              org.debian.monotone
changelog:
Add upstream fix for compilation issues with (e)glibc >= 2.14.

manifest:
format_version "1"

new_manifest [f142e76347aecc32de1887fbefac731a0117be64]

old_revision [1c59268fa4479cf6df6ad73f8e9831b08645e78b]

add_file "patches/02-file_handle.diff"
 content [b6da4bc3e4744dc8718f7a0510183757dc5d002e]

patch "changelog"
 from [a1a6fb4d138a965215e5c578c7a8adeb6ccab302]
   to [d858754826d637a61dfeda7ca11a6d5e5cbdaed4]

patch "patches/series"
 from [5e8dcc51f98f52976bffec535c557bf30f11d89c]
   to [9be7ace253d836c42168c3dcb3386cabc23aca9e]
============================================================
--- changelog	a1a6fb4d138a965215e5c578c7a8adeb6ccab302
+++ changelog	d858754826d637a61dfeda7ca11a6d5e5cbdaed4
@@ -5,8 +5,11 @@ monotone (1.0-5) unstable; urgency=low
     dpkg-buildflags that are no longer set by dpkg-buildpackage. 
   * patches/01-format-security.diff: Backport upstream fix for building 
     with hardened Debian build flags. Closes: #646349. 
+  * patches/02-file_handle.diff: Backport upstream fix for name clash
+    between monotone's "file_handle" struct and the one defined in
+    "fcntl.h" from (e)glibc >=2.14.
 
- -- Francis Russell <address@hidden>  Tue, 27 Mar 2012 10:43:24 +0100
+ -- Francis Russell <address@hidden>  Tue, 27 Mar 2012 12:36:29 +0100
 
 monotone (1.0-4) unstable; urgency=low
 
============================================================
--- /dev/null	
+++ patches/02-file_handle.diff	b6da4bc3e4744dc8718f7a0510183757dc5d002e
@@ -0,0 +1,153 @@
+Description: Rename struct "file_handle" to "rcs_file_handle" to avoid
+ confict with glibc >= 2.14.
+Origin: upstream, commit: da62cad10eda55aa233ac124273f3db4f541137a
+Index: monotone-1.0/src/rcs_file.cc
+===================================================================
+--- monotone-1.0.orig/src/rcs_file.cc	2011-03-26 06:41:01.000000000 +0000
++++ monotone-1.0/src/rcs_file.cc	2012-03-26 01:41:52.208975095 +0100
+@@ -42,12 +42,12 @@
+ 
+ #ifdef HAVE_MMAP
+ struct
+-file_handle
++rcs_file_handle
+ {
+   string const & filename;
+   off_t length;
+   int fd;
+-  file_handle(string const & fn) :
++  rcs_file_handle(string const & fn) :
+     filename(fn),
+     length(0),
+     fd(-1)
+@@ -60,13 +60,13 @@
+       if (fd == -1)
+         throw oops("open of " + filename + " failed");
+     }
+-  ~file_handle()
++  ~rcs_file_handle()
+     {
+       if (close(fd) == -1)
+         throw oops("close of " + filename + " failed");
+     }
+ };
+-struct file_source
++struct rcs_file_source
+ {
+   string const & filename;
+   int fd;
+@@ -91,7 +91,7 @@
+       ++pos;
+     return good();
+   }
+-  file_source(string const & fn,
++  rcs_file_source(string const & fn,
+               int f,
+               off_t len) :
+     filename(fn),
+@@ -104,7 +104,7 @@
+     if (mapping == MAP_FAILED)
+       throw oops("mmap of " + filename + " failed");
+   }
+-  ~file_source()
++  ~rcs_file_source()
+   {
+     if (munmap(mapping, length) == -1)
+       throw oops("munmapping " + filename + " failed, after reading RCS file");
+@@ -112,12 +112,12 @@
+ };
+ #elif defined(WIN32)
+ struct
+-file_handle
++rcs_file_handle
+ {
+   string const & filename;
+   off_t length;
+   HANDLE fd;
+-  file_handle(string const & fn) :
++  rcs_file_handle(string const & fn) :
+     filename(fn),
+     length(0),
+     fd(NULL)
+@@ -134,7 +134,7 @@
+       if (fd == NULL)
+         throw oops("open of " + filename + " failed");
+     }
+-  ~file_handle()
++  ~rcs_file_handle()
+     {
+       if (CloseHandle(fd)==0)
+         throw oops("close of " + filename + " failed");
+@@ -142,7 +142,7 @@
+ };
+ 
+ struct
+-file_source
++rcs_file_source
+ {
+   string const & filename;
+   HANDLE fd,map;
+@@ -167,7 +167,7 @@
+       ++pos;
+     return good();
+   }
+-  file_source(string const & fn,
++  rcs_file_source(string const & fn,
+               HANDLE f,
+               off_t len) :
+     filename(fn),
+@@ -183,7 +183,7 @@
+     if (mapping==NULL)
+       throw oops("MapViewOfFile of " + filename + " failed");
+   }
+-  ~file_source()
++  ~rcs_file_source()
+   {
+     if (UnmapViewOfFile(mapping)==0)
+       throw oops("UnmapViewOfFile of " + filename + " failed");
+@@ -193,7 +193,7 @@
+ };
+ #else
+ // no mmap at all
+-typedef istream file_source;
++typedef istream rcs_file_source;
+ #endif
+ 
+ typedef enum
+@@ -220,7 +220,7 @@
+ }
+ 
+ static token_type
+-get_token(file_source & ist,
++get_token(rcs_file_source & ist,
+           string & str,
+           size_t & line,
+           size_t & col)
+@@ -303,14 +303,14 @@
+ 
+ struct parser
+ {
+-  file_source & ist;
++  rcs_file_source & ist;
+   rcs_file & r;
+   string token;
+   token_type ttype;
+ 
+   size_t line, col;
+ 
+-  parser(file_source & s,
++  parser(rcs_file_source & s,
+          rcs_file & r)
+     : ist(s), r(r), line(1), col(1)
+   {}
+@@ -489,8 +489,8 @@
+ parse_rcs_file(string const & filename, rcs_file & r)
+ {
+ #if defined(HAVE_MMAP) || defined(WIN32)
+-      file_handle handle(filename);
+-      file_source ifs(filename, handle.fd, handle.length);
++      rcs_file_handle handle(filename);
++      rcs_file_source ifs(filename, handle.fd, handle.length);
+ #else
+       ifstream ifs(filename.c_str());
+       ifs.unsetf(ios_base::skipws);
============================================================
--- patches/series	5e8dcc51f98f52976bffec535c557bf30f11d89c
+++ patches/series	9be7ace253d836c42168c3dcb3386cabc23aca9e
@@ -1,4 +1,5 @@ 01-format-security.diff
 00-db-extension-bash-completion.diff
 01-format-security.diff
+02-file_handle.diff
 10-mtn-ignore-syntax-error-test.diff
 90-stacktrace-on-crash.diff

reply via email to

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