lib/upnp/Compat: remove obsolete kludges

Those bugs have been fixed looong ago.
This commit is contained in:
Max Kellermann 2023-12-28 21:23:43 +01:00
parent b9a7a9981e
commit d0a4270449
6 changed files with 9 additions and 45 deletions

View File

@ -1,10 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_UPNP_CALLBACK_HXX
#define MPD_UPNP_CALLBACK_HXX
#pragma once
#include "Compat.hxx"
#include <upnp.h>
/**
* A class that is supposed to be used for libupnp asynchronous
@ -26,5 +25,3 @@ public:
virtual int Invoke(Upnp_EventType et, const void *evp) noexcept = 0;
};
#endif

View File

@ -1,15 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_UPNP_CLIENT_INIT_HXX
#define MPD_UPNP_CLIENT_INIT_HXX
#pragma once
#include "Compat.hxx"
#include <upnp.h>
UpnpClient_Handle
UpnpClientGlobalInit(const char* iface);
void
UpnpClientGlobalFinish() noexcept;
#endif

View File

@ -1,23 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_UPNP_COMPAT_HXX
#define MPD_UPNP_COMPAT_HXX
#ifdef __clang__
/* libupnp versions until 1.10.1 redefine "bool" and "true" */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wkeyword-macro"
/* libupnp 1.8.4 uses a flawed kludge to suppress this warning in
inline function __list_add_valid() */
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#endif
#include <upnp.h>
#ifdef __clang__
#pragma GCC diagnostic pop
#endif
#endif

View File

@ -1,10 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef _UPNPDIR_HXX_INCLUDED_
#define _UPNPDIR_HXX_INCLUDED_
#pragma once
#include "Compat.hxx"
#include <upnp.h>
#include <string>
#include <forward_list>
@ -103,5 +102,3 @@ public:
return m_friendlyName.c_str();
}
};
#endif /* _UPNPDIR_HXX_INCLUDED_ */

View File

@ -1,10 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef _UPNPPDISC_H_X_INCLUDED_
#define _UPNPPDISC_H_X_INCLUDED_
#include "Compat.hxx"
#include "Callback.hxx"
#include "Device.hxx"
#include "lib/curl/Init.hxx"
@ -14,6 +10,8 @@
#include "event/InjectEvent.hxx"
#include "util/IntrusiveList.hxx"
#include <upnp.h>
#include <list>
#include <vector>
#include <string>
@ -174,5 +172,3 @@ private:
int Invoke(Upnp_EventType et, const void *evp) noexcept override;
};
#endif /* _UPNPPDISC_H_X_INCLUDED_ */

View File

@ -2,10 +2,10 @@
// Copyright The Music Player Daemon Project
#include "Init.hxx"
#include "Compat.hxx"
#include "Error.hxx"
#include "thread/Mutex.hxx"
#include <upnp.h>
#include <upnptools.h>
#ifdef USING_PUPNP
# include <ixml.h>