The following commit has been merged in the master branch:
commit 7b8ef8e514d1b794ddf6c5449abe3984171dab5c
Author: Andrei Zavada <[email protected]>
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 <[email protected]>])
 
-AC_INIT([Aghermann], [1.0_rc], [[email protected]])
+AC_INIT([Aghermann], [0.9.0.3], [[email protected]])
 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">&lt;b&gt;&lt;big&gt;&lt;big&gt;Aghermann 0.9.0.2 
&lt;/big&gt;&lt;/big&gt;&lt;/b&gt;Jibo 
+                    <property 
name="label">&lt;b&gt;&lt;big&gt;&lt;big&gt;Aghermann 0.9.0.3 
&lt;/big&gt;&lt;/big&gt;&lt;/b&gt;Jibo 
 &lt;a 
href="http://johnhommer.com/academic/code/aghermann"&gt;johnhommer.com/academic/code/aghermann&lt;/a&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
@@ -424,7 +424,12 @@ With bug reports, either send yours to &lt;a 
href="mailto:aghermann-users@lists.
                             <property name="yalign">0</property>
                             <property name="xpad">10</property>
                             <property name="ypad">10</property>
-                            <property name="label">&lt;big&gt;&lt;b&gt;v. 
0.9.0.2&lt;/b&gt;&lt;/big&gt; (2013-05-07)
+                            <property name="label">&lt;big&gt;&lt;b&gt;v. 
0.9.0.3&lt;/b&gt;&lt;/big&gt; (2013-05-16)
+&lt;span font="monospace"&gt;
+       * Check for mremap and use munmap+memmove+mmap if it is
+         unavailable; and comment out CEDFFile::resize() as unused.
+&lt;/span&gt;
+&lt;big&gt;&lt;b&gt;v. 0.9.0.2&lt;/b&gt;&lt;/big&gt; (2013-05-07)
 &lt;span font="monospace"&gt;
        * Properly fix CEDFFile::get_signal_*.
 &lt;/span&gt;
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 <[email protected]>  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

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to