[med-svn] [SCM] aghermann branch, master, updated. 7b8ef8e514d1b794ddf6c5449abe3984171dab5c

Andrei Zavada johnhommer at gmail.com
Thu May 16 23:12:16 UTC 2013


The following commit has been merged in the master branch:
commit 7b8ef8e514d1b794ddf6c5449abe3984171dab5c
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Fri May 17 02:11:48 2013 +0300

    fix (wrt mremap possibly unavailable) and put away CEDFFile::resize()
    
    it's unused anyway

diff --git a/ChangeLog b/ChangeLog
index 9c469f5..58d8f87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+v.0.9.0.3 (2013-05-16)
+	* Check for mremap and use munmap+memmove+mmap if it is
+	  unavailable; and comment out CEDFFile::resize() as unused.
 v.0.9.0.2 (2013-05-07)
 	* Properly fix CEDFFile::get_signal_*.
 v.0.9.0.1 (2013-05-02)
diff --git a/configure.ac b/configure.ac
index 30c431e..5839d0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_COPYRIGHT([Copyright (c) 2008-13 Andrei Zavada <johnhommer at gmail.com>])
 
-AC_INIT([Aghermann], [1.0_rc], [johnhommer at gmail.com])
+AC_INIT([Aghermann], [0.9.0.3], [johnhommer at gmail.com])
 AC_CONFIG_SRCDIR([src/main.cc])
 AC_CONFIG_MACRO_DIR([m4])
 AC_PREREQ(2.61)
@@ -17,6 +17,9 @@ AC_PROG_CXX([$CXX])
 AC_LANG([C++])
 AC_OPENMP()
 
+dnl AC_CHECK_FUNCS(mremap,,)
+
+
 dnl Check for c++11 features
 AC_DEFUN([AC_CXX_STDCPP11_FEATURES],
 [AC_CACHE_CHECK(whether $CXX has all required c++11 features,
diff --git a/data/mw-dialogs.glade b/data/mw-dialogs.glade
index 5548ca1..4ae175a 100644
--- a/data/mw-dialogs.glade
+++ b/data/mw-dialogs.glade
@@ -328,7 +328,7 @@
                     <property name="xalign">0</property>
                     <property name="xpad">5</property>
                     <property name="ypad">15</property>
-                    <property name="label"><b><big><big>Aghermann 0.9.0.2 </big></big></b>Jibo 
+                    <property name="label"><b><big><big>Aghermann 0.9.0.3 </big></big></b>Jibo 
 <a href="http://johnhommer.com/academic/code/aghermann">johnhommer.com/academic/code/aghermann</a></property>
                     <property name="use_markup">True</property>
                   </object>
@@ -424,7 +424,12 @@ With bug reports, either send yours to <a href="mailto:aghermann-users at lists.
                             <property name="yalign">0</property>
                             <property name="xpad">10</property>
                             <property name="ypad">10</property>
-                            <property name="label"><big><b>v. 0.9.0.2</b></big> (2013-05-07)
+                            <property name="label"><big><b>v. 0.9.0.3</b></big> (2013-05-16)
+<span font="monospace">
+	* Check for mremap and use munmap+memmove+mmap if it is
+	  unavailable; and comment out CEDFFile::resize() as unused.
+</span>
+<big><b>v. 0.9.0.2</b></big> (2013-05-07)
 <span font="monospace">
 	* Properly fix CEDFFile::get_signal_*.
 </span>
diff --git a/debian/changelog b/debian/changelog
index 2b74c35..d605174 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+aghermann (0.9.0.3-1) unstable; urgency=low
+
+  * New upstream version.
+    - fixed build on arches not providing mremap (Closes: #708557).
+
+ -- Andrei Zavada <johnhommer at gmail.com>  Fri, 17 May 2013 00:04:35 +0200
+
 aghermann (0.9.0.2-1) unstable; urgency=low
 
   * New upstream version.
diff --git a/src/libsigfile/edf.cc b/src/libsigfile/edf.cc
index 55f2ca3..5a54285 100644
--- a/src/libsigfile/edf.cc
+++ b/src/libsigfile/edf.cc
@@ -350,6 +350,8 @@ set_digital_range( const int16_t m, const int16_t M)
 
 
 
+// uncomment on demand (also un-dnl AC_CHECK_FUNCS(mremap,,) in configure.ac)
+/*
 size_t
 CEDFFile::
 resize( const size_t new_records)
@@ -361,11 +363,25 @@ resize( const size_t new_records)
 		= n_data_records;
 	auto new_fsize
 		= header_length + 2 * total_samples_per_record * (n_data_records = new_records);
+
+#if !HAVE_MREMAP
 	_mmapping =
 		mremap( _mmapping,
 			_fsize,
 			new_fsize,
-			0);
+			0|MREMAP_MAYMOVE);
+#else
+	void *_m2 =
+		mmap( NULL,
+		      new_fsize,
+		      PROT_READ | PROT_WRITE, MAP_SHARED,
+		      _fd,
+		      0);
+	memmove( _m2, _mmapping, _fsize);
+	munmap( _mmapping, _fsize);
+	_mmapping = _m2;
+#endif
+
 	if ( _mmapping == (void*)-1 ) {
 		close( _fd);
 		throw length_error ("CEDFFile::resize(): mmap error");
@@ -375,7 +391,7 @@ resize( const size_t new_records)
 	return old_records;
 }
 
-
+*/
 
 CEDFFile::
 CEDFFile (CEDFFile&& rv)

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list