Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d2bd1282
Commit
d2bd1282
authored
May 26, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.22.x'
parents
8a9d678b
7a6823dc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
37 deletions
+90
-37
NEWS
NEWS
+2
-0
user.rst
doc/user.rst
+1
-1
meson.build
meson.build
+37
-28
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+3
-4
meson.build
src/lib/sqlite/meson.build
+6
-1
Database.cxx
src/sticker/Database.cxx
+2
-1
Poll.cxx
src/zeroconf/avahi/Poll.cxx
+26
-2
.gitignore
subprojects/.gitignore
+1
-0
sqlite3.wrap
subprojects/sqlite3.wrap
+12
-0
No files found.
NEWS
View file @
d2bd1282
...
...
@@ -15,6 +15,8 @@ ver 0.23 (not yet released)
* new build-time dependency: libfmt
ver 0.22.9 (not yet released)
* Windows
- fix build failure with SQLite
ver 0.22.8 (2021/05/22)
* fix crash bug in "albumart" command (0.22.7 regression)
...
...
doc/user.rst
View file @
d2bd1282
...
...
@@ -55,7 +55,7 @@ and unpack it (or `clone the git repository
In
any
case
,
you
need
:
*
a
C
++
17
compiler
(
e
.
g
.
GCC
8
or
clang
5
)
*
a
C
++
17
compiler
(
e
.
g
.
GCC
8
or
clang
7
)
*
`
Meson
0.49.0
<
http
://
mesonbuild
.
com
/>`
__
and
`
Ninja
<
https
://
ninja
-
build
.
org
/>`
__
*
Boost
1.58
...
...
meson.build
View file @
d2bd1282
...
...
@@ -24,8 +24,8 @@ c_compiler = meson.get_compiler('c')
if compiler.get_id() == 'gcc' and compiler.version().version_compare('<8')
warning('Your GCC version is too old. You need at least version 8.')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<
5
')
warning('Your clang version is too old. You need at least version
5
.')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<
7
')
warning('Your clang version is too old. You need at least version
7
.')
endif
version_conf = configuration_data()
...
...
@@ -42,57 +42,64 @@ common_cppflags = [
'-D_GNU_SOURCE',
]
common_cflags = [
]
common_cxxflags = [
test_global_common_flags = [
'-fvisibility=hidden',
]
test_common_flags = [
'-Wvla',
'-Wdouble-promotion',
'-fvisibility=hidden',
'-ffast-math',
'-ftree-vectorize',
]
test_global_cxxflags = test_global_common_flags + [
]
test_global_cflags = test_global_common_flags + [
]
test_cxxflags = test_common_flags + [
'-fno-threadsafe-statics',
'-fmerge-all-constants',
'-Wcast-qual',
'-Wcomma-subscript',
'-Wextra-semi',
'-Wmismatched-tags',
'-Wmissing-declarations',
'-Woverloaded-virtual',
'-Wshadow',
'-Wpointer-arith',
'-Wcast-qual',
'-Wsign-promo',
'-Wunused',
'-Wvolatile',
'-Wvirtual-inheritance',
'-Wwrite-strings',
'-Wsign-compare',
# a vtable without a dtor is just fine
'-Wno-non-virtual-dtor',
# clang specific warning options:
'-Wcomma',
'-Wextra-semi',
'-Wheader-hygiene',
'-Winconsistent-missing-destructor-override',
'-Wunreachable-code-break',
'-Wunused',
'-Wunreachable-code-aggressive',
'-Wused-but-marked-unused',
'-Wno-non-virtual-dtor',
]
if compiler.get_id()
== 'clang'
#
Workaround for clang bug
#
https://bugs.llvm.org/show_bug.cgi?id=32611
test_cxxflags += '-
funwind-tables
'
if compiler.get_id()
!= 'gcc' or compiler.version().version_compare('>=9')
#
The GCC 8 implementation of this flag is buggy: it complains even
#
if "final" is present, which implies "override".
test_cxxflags += '-
Wsuggest-override
'
endif
test_cflags = test_common_flags + [
'-Wcast-qual',
'-Wmissing-prototypes',
'-Wshadow',
'-Wpointer-arith',
'-Wstrict-prototypes',
'-Wcast-qual',
'-Wwrite-strings',
'-pedantic',
]
test_ldflags = [
...
...
@@ -104,11 +111,11 @@ test_ldflags = [
]
if get_option('buildtype') != 'debug'
test_cxxflags += [
test_
global_
cxxflags += [
'-ffunction-sections',
'-fdata-sections',
]
test_cflags += [
test_
global_
cflags += [
'-ffunction-sections',
'-fdata-sections',
]
...
...
@@ -127,9 +134,11 @@ if get_option('fuzzer')
add_global_link_arguments(fuzzer_flags, language: 'cpp')
endif
add_global_arguments(common_cxxflags + compiler.get_supported_arguments(test_cxxflags), language: 'cpp')
add_global_arguments(common_cflags + c_compiler.get_supported_arguments(test_cflags), language: 'c')
add_global_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
add_global_arguments(compiler.get_supported_arguments(test_global_cxxflags), language: 'cpp')
add_global_arguments(c_compiler.get_supported_arguments(test_global_cflags), language: 'c')
add_project_arguments(compiler.get_supported_arguments(test_cxxflags), language: 'cpp')
add_project_arguments(c_compiler.get_supported_arguments(test_cflags), language: 'c')
add_project_link_arguments(compiler.get_supported_link_arguments(test_ldflags), language: 'cpp')
is_linux = host_machine.system() == 'linux'
is_android = get_option('android_ndk') != ''
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
d2bd1282
...
...
@@ -889,8 +889,6 @@ inline bool
MadDecoder
::
HandleCurrentFrame
()
noexcept
{
switch
(
mute_frame
)
{
DecoderCommand
cmd
;
case
MadDecoderMuteFrame
:
:
SKIP
:
mute_frame
=
MadDecoderMuteFrame
::
NONE
;
break
;
...
...
@@ -899,8 +897,8 @@ MadDecoder::HandleCurrentFrame() noexcept
mute_frame
=
MadDecoderMuteFrame
::
NONE
;
UpdateTimerNextFrame
();
break
;
case
MadDecoderMuteFrame
:
:
NONE
:
cmd
=
SynthAndSubmit
();
case
MadDecoderMuteFrame
:
:
NONE
:
{
c
onst
auto
c
md
=
SynthAndSubmit
();
UpdateTimerNextFrame
();
if
(
cmd
==
DecoderCommand
::
SEEK
)
{
assert
(
input_stream
.
IsSeekable
());
...
...
@@ -922,6 +920,7 @@ MadDecoder::HandleCurrentFrame() noexcept
}
else
if
(
cmd
!=
DecoderCommand
::
NONE
)
return
false
;
}
}
return
true
;
}
...
...
src/lib/sqlite/meson.build
View file @
d2bd1282
if enable_database
sqlite_dep = dependency('sqlite3', version: '>= 3.7.3', required: get_option('sqlite'))
sqlite_dep = dependency('sqlite3', version: '>= 3.7.3',
fallback: ['sqlite3', 'sqlite3_dep'],
required: get_option('sqlite'))
else
sqlite_dep = dependency('', required: false)
endif
...
...
@@ -21,4 +23,7 @@ sqlite = static_library(
sqlite_dep = declare_dependency(
link_with: sqlite,
dependencies: [
sqlite_dep,
],
)
src/sticker/Database.cxx
View file @
d2bd1282
...
...
@@ -21,6 +21,7 @@
#include "Sticker.hxx"
#include "lib/sqlite/Util.hxx"
#include "fs/Path.hxx"
#include "fs/NarrowPath.hxx"
#include "Idle.hxx"
#include "util/StringCompare.hxx"
#include "util/ScopeExit.hxx"
...
...
@@ -82,7 +83,7 @@ static const char sticker_sql_create[] =
""
;
StickerDatabase
::
StickerDatabase
(
Path
path
)
:
db
(
path
.
c_str
(
))
:
db
(
NarrowPath
(
path
))
{
assert
(
!
path
.
IsNull
());
...
...
src/zeroconf/avahi/Poll.cxx
View file @
d2bd1282
...
...
@@ -89,13 +89,13 @@ public:
:
event
(
_loop
,
BIND_THIS_METHOD
(
OnTimeout
)),
callback
(
_callback
),
userdata
(
_userdata
)
{
if
(
tv
!=
nullptr
)
event
.
Schedule
(
ToSteadyClockDuration
(
*
tv
)
);
Schedule
(
*
tv
);
}
static
void
TimeoutUpdate
(
AvahiTimeout
*
t
,
const
struct
timeval
*
tv
)
noexcept
{
if
(
tv
!=
nullptr
)
t
->
event
.
Schedule
(
ToSteadyClockDuration
(
*
tv
)
);
t
->
Schedule
(
*
tv
);
else
t
->
event
.
Cancel
();
}
...
...
@@ -105,6 +105,30 @@ public:
}
private
:
[[
gnu
::
pure
]]
Event
::
Duration
AbsoluteToDuration
(
const
struct
timeval
&
tv
)
noexcept
{
if
(
tv
.
tv_sec
==
0
)
/* schedule immediately */
return
{};
struct
timeval
now
;
if
(
gettimeofday
(
&
now
,
nullptr
)
<
0
)
/* shouldn't ever fail, but if it does, do
something reasonable */
return
std
::
chrono
::
seconds
(
1
);
auto
d
=
ToSteadyClockDuration
(
tv
)
-
ToSteadyClockDuration
(
now
);
if
(
d
.
count
()
<
0
)
return
{};
return
d
;
}
void
Schedule
(
const
struct
timeval
&
tv
)
noexcept
{
event
.
Schedule
(
AbsoluteToDuration
(
tv
));
}
void
OnTimeout
()
noexcept
{
callback
(
this
,
userdata
);
}
...
...
subprojects/.gitignore
View file @
d2bd1282
...
...
@@ -2,3 +2,4 @@
/fmt-*/
/googletest-*/
/sqlite-*/
subprojects/sqlite3.wrap
0 → 100644
View file @
d2bd1282
[wrap-file]
directory = sqlite-amalgamation-3340100
source_url = https://www.sqlite.org/2021/sqlite-amalgamation-3340100.zip
source_filename = sqlite-amalgamation-3340100.zip
source_hash = e0b1c0345fe4338b936e17da8e1bd88366cd210e576834546977f040c12a8f68
patch_url = https://wrapdb.mesonbuild.com/v1/projects/sqlite3/3.34.1/1/get_zip
patch_filename = sqlite3-3.34.1-1-wrap.zip
patch_hash = cba9e47bdb4c02f88fadaae8deab357218d32562c6b86ce7ba0c72f107044360
[provide]
sqlite3 = sqlite3_dep
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment