Patched for C++11 compatibility.

This commit is contained in:
Jonathan Wakely 2016-02-02 21:43:53 +00:00
parent b518aa87f3
commit 1e8257e839
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,51 @@
--- fldigi-3.23.07/src/fsq/fsq.cxx.orig 2016-02-02 21:28:31.000187067 +0000
+++ fldigi-3.23.07/src/fsq/fsq.cxx 2016-02-02 22:11:53.905958417 +0000
@@ -1195,9 +1195,11 @@
&rx_stream[SHIFT_SIZE], // from
BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
memset(fft_data, 0, sizeof(fft_data));
- for (int i = 0; i < BLOCK_SIZE; i++)
- fft_data[i].real() = fft_data[i].imag() =
- rx_stream[i] * a_blackman[i];
+ for (int i = 0; i < BLOCK_SIZE; i++) {
+ double d = rx_stream[i] * a_blackman[i];
+ fft_data[i].real(d);
+ fft_data[i].imag(d);
+ }
fft->ComplexFFT(fft_data);
process_tones();
}
@@ -1449,6 +1451,7 @@
void fsq_repeat_last_command()
{
+ using ::next; // disambiguate from std::next
fsq_tx_text->clear();
fsq_tx_text->addstr(sz2utf8(commands[next].c_str()));
next++;
@@ -1494,7 +1497,7 @@
if (active_modem != fsq_modem) return;
if (!active_modem->fsq_squelch_open() && trx_state == STATE_RX) {
- next = 0;
+ ::next = 0;
fsq_que_clear();
//LOG_WARN("%s", "start_tx()");
start_tx();
--- fldigi-3.23.07/src/ifkp/ifkp.cxx.orig 2016-02-02 19:36:16.198368410 +0000
+++ fldigi-3.23.07/src/ifkp/ifkp.cxx 2016-02-02 22:11:13.321744996 +0000
@@ -580,9 +580,11 @@
&rx_stream[IFKP_SHIFT_SIZE], // from
IFKP_BLOCK_SIZE*sizeof(*rx_stream)); // # bytes
memset(fft_data, 0, sizeof(fft_data));
- for (int i = 0; i < IFKP_BLOCK_SIZE; i++)
- fft_data[i].real() = fft_data[i].imag() =
- rx_stream[i] * a_blackman[i];
+ for (int i = 0; i < IFKP_BLOCK_SIZE; i++) {
+ double d = rx_stream[i] * a_blackman[i];
+ fft_data[i].real(d);
+ fft_data[i].imag(d);
+ }
fft->ComplexFFT(fft_data);
process_tones();
}

View File

@ -2,7 +2,7 @@
Name: fldigi
Version: 3.23.07
Release: 1%{?prerel:.%{prerel}}%{?dist}
Release: 2%{?prerel:.%{prerel}}%{?dist}
Summary: Digital modem program for Linux
License: GPLv3+
@ -10,6 +10,7 @@ URL: http://www.w1hkj.com/Fldigi.html
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{?prerel}.tar.gz
Source1: http://downloads.sourceforge.net/%{name}/%{name}-help.pdf
Source100: fldigi.appdata.xml
Patch0: fldigi-3.23.07-cxx11.patch
BuildRequires: hamlib-devel
BuildRequires: fltk-devel >= 1.3
@ -58,6 +59,7 @@ PDF User Manual for %{name}.
%prep
%setup -q -n %{name}-%{version}%{?prerel}
%patch0 -p1
# Remove bundled xmlrpc library
#rm -rf src/xmlrpcpp
@ -132,6 +134,9 @@ fi
%changelog
* Tue Feb 02 2016 Jonathan Wakely <jwakely@redhat.com> - 3.23.07-2
- Patched for C++11 compatibility.
* Fri Jan 22 2016 Richard Shaw <hobbes1069@gmail.com> - 3.23.07-1
- Update to latest upstream release.