replace stdint.h with cstdint

The former is deprecated by C++14. The standard says they are the same: The header defines all types and macros the same as the C standard library header<stdint.h>. Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent 2db8bcc3
...@@ -30,10 +30,9 @@ ...@@ -30,10 +30,9 @@
#endif #endif
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <memory> #include <memory>
#include <stdint.h>
static constexpr size_t CHUNK_SIZE = 4096; static constexpr size_t CHUNK_SIZE = 4096;
struct AudioFormat; struct AudioFormat;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_PLAYLIST_PRINT_HXX #ifndef MPD_PLAYLIST_PRINT_HXX
#define MPD_PLAYLIST_PRINT_HXX #define MPD_PLAYLIST_PRINT_HXX
#include <stdint.h> #include <cstdint>
struct playlist; struct playlist;
class SongFilter; class SongFilter;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
enum class ReplayGainMode : uint8_t { enum class ReplayGainMode : uint8_t {
OFF, OFF,
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
enum class SingleMode : uint8_t { enum class SingleMode : uint8_t {
OFF, OFF,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_TAG_PRINT_HXX #ifndef MPD_TAG_PRINT_HXX
#define MPD_TAG_PRINT_HXX #define MPD_TAG_PRINT_HXX
#include <stdint.h> #include <cstdint>
enum TagType : uint8_t; enum TagType : uint8_t;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
enum TagType : uint8_t; enum TagType : uint8_t;
struct Partition; struct Partition;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_DB_PRINT_H #ifndef MPD_DB_PRINT_H
#define MPD_DB_PRINT_H #define MPD_DB_PRINT_H
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
enum TagType : uint8_t; enum TagType : uint8_t;
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <cerrno> #include <cerrno>
#include <climits> #include <climits>
#include <cstdint>
#include <sys/inotify.h> #include <sys/inotify.h>
#include <stdint.h>
bool bool
InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "input/Ptr.hxx" #include "input/Ptr.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
struct AudioFormat; struct AudioFormat;
struct Tag; struct Tag;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_DECODER_COMMAND_HXX #ifndef MPD_DECODER_COMMAND_HXX
#define MPD_DECODER_COMMAND_HXX #define MPD_DECODER_COMMAND_HXX
#include <stdint.h> #include <cstdint>
enum class DecoderCommand : uint8_t { enum class DecoderCommand : uint8_t {
NONE = 0, NONE = 0,
......
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#include "ReplayGainMode.hxx" #include "ReplayGainMode.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <stdint.h>
/* damn you, windows.h! */ /* damn you, windows.h! */
#ifdef ERROR #ifdef ERROR
#undef ERROR #undef ERROR
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
// IWYU pragma: end_exports // IWYU pragma: end_exports
#include <stdint.h> #include <cstdint>
/** /**
* Throw an instance of this class to stop decoding the current song * Throw an instance of this class to stop decoding the current song
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
class DecoderClient; class DecoderClient;
class InputStream; class InputStream;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "input/Offset.hxx" #include "input/Offset.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
class TagHandler; class TagHandler;
class DecoderClient; class DecoderClient;
......
...@@ -24,7 +24,7 @@ extern "C" { ...@@ -24,7 +24,7 @@ extern "C" {
#include "libavformat/avio.h" #include "libavformat/avio.h"
} }
#include <stdint.h> #include <cstdint>
class DecoderClient; class DecoderClient;
class InputStream; class InputStream;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "OpusHead.hxx" #include "OpusHead.hxx"
#include <stdint.h> #include <cstdint>
struct OpusHead { struct OpusHead {
char signature[8]; char signature[8];
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <algorithm> #include <algorithm>
#include <cstdint>
#include <stdint.h>
#include <string.h> #include <string.h>
class OpusReader { class OpusReader {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "util/NumberParser.hxx" #include "util/NumberParser.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <stdint.h> #include <cstdint>
gcc_pure gcc_pure
static TagType static TagType
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#include "util/StaticFifoBuffer.hxx" #include "util/StaticFifoBuffer.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <exception> #include <exception>
#include <stdint.h>
class EventLoop; class EventLoop;
/** /**
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
#include "util/WritableBuffer.hxx" #include "util/WritableBuffer.hxx"
#include <array> #include <array>
#include <cstdint>
#include <stdexcept> #include <stdexcept>
#include <string.h> #include <string.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
class RouteFilter final : public Filter { class RouteFilter final : public Filter {
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
#endif #endif
#include <chrono> #include <chrono>
#include <cstdint>
#include <stdint.h>
class FileInfo { class FileInfo {
friend bool GetFileInfo(Path path, FileInfo &info, friend bool GetFileInfo(Path path, FileInfo &info,
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
#include "Reader.hxx" #include "Reader.hxx"
#include "util/TextFile.hxx" #include "util/TextFile.hxx"
#include <cstdint>
#include <stdexcept> #include <stdexcept>
#include <stdint.h>
#include <string.h> #include <string.h>
bool bool
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#endif #endif
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Reader.hxx" #include "Reader.hxx"
#include <stdint.h> #include <cstdint>
/** /**
* A filter that allows the caller to peek the first few bytes without * A filter that allows the caller to peek the first few bytes without
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_OFFSET_HXX #ifndef MPD_OFFSET_HXX
#define MPD_OFFSET_HXX #define MPD_OFFSET_HXX
#include <stdint.h> #include <cstdint>
/** /**
* A type for absolute offsets in a file. * A type for absolute offsets in a file.
......
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
#include "util/CircularBuffer.hxx" #include "util/CircularBuffer.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <exception> #include <exception>
#include <stdint.h>
/** /**
* Helper class for moving InputStream implementations with blocking * Helper class for moving InputStream implementations with blocking
* backend library implementation to a dedicated thread. Data is * backend library implementation to a dedicated thread. Data is
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "config/Block.hxx" #include "config/Block.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdio.h> #include <stdio.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
namespace Alsa { namespace Alsa {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
static constexpr uint_least32_t static constexpr uint_least32_t
MakeAlsaVersion(uint_least32_t major, uint_least32_t minor, MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,
......
...@@ -24,11 +24,10 @@ ...@@ -24,11 +24,10 @@
#include "decoder/Client.hxx" #include "decoder/Client.hxx"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include <cstdint>
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <stdint.h>
class PcmConvert; class PcmConvert;
class ChromaprintDecoderClient : public DecoderClient { class ChromaprintDecoderClient : public DecoderClient {
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <array> #include <array>
#include <cstdint>
#include <stdint.h>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -29,8 +29,7 @@ extern "C" { ...@@ -29,8 +29,7 @@ extern "C" {
} }
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
/* suppress the ffmpeg compatibility macro */ /* suppress the ffmpeg compatibility macro */
#ifdef SampleFormat #ifdef SampleFormat
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <array> #include <array>
#include <cstdint>
#include <stdint.h>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <exception> #include <exception>
#include <string> #include <string>
#include <stdint.h>
#include <sys/stat.h> #include <sys/stat.h>
struct nfsfh; struct nfsfh;
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include <ogg/ogg.h> #include <ogg/ogg.h>
#include <cassert> #include <cassert>
#include <cstdint>
#include <string.h> #include <string.h>
#include <stdint.h>
static size_t static size_t
ReadPage(const ogg_page &page, void *_buffer, size_t size) noexcept ReadPage(const ogg_page &page, void *_buffer, size_t size) noexcept
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include <ogg/ogg.h> #include <ogg/ogg.h>
#include <cassert> #include <cassert>
#include <cstdint>
#include <string.h> #include <string.h>
#include <stdint.h>
class OggStreamState { class OggStreamState {
ogg_stream_state state; ogg_stream_state state;
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include <ogg/ogg.h> #include <ogg/ogg.h>
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
class Reader; class Reader;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "SocketAddress.hxx" #include "SocketAddress.hxx"
#include "util/ByteOrder.hxx" #include "util/ByteOrder.hxx"
#include <stdint.h> #include <cstdint>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock2.h> #include <winsock2.h>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "util/ByteOrder.hxx" #include "util/ByteOrder.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
#ifdef _WIN32 #ifdef _WIN32
#include <winsock2.h> #include <winsock2.h>
......
...@@ -28,12 +28,11 @@ ...@@ -28,12 +28,11 @@
#include "system/PeriodClock.hxx" #include "system/PeriodClock.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <cstdint>
#include <exception> #include <exception>
#include <map>
#include <memory> #include <memory>
#include <string> #include <string>
#include <map>
#include <stdint.h>
enum class ReplayGainMode : uint8_t; enum class ReplayGainMode : uint8_t;
struct FilteredAudioOutput; struct FilteredAudioOutput;
......
...@@ -29,11 +29,10 @@ ...@@ -29,11 +29,10 @@
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <stdint.h>
struct MusicChunk; struct MusicChunk;
struct Tag; struct Tag;
class Filter; class Filter;
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "util/AllocatedArray.hxx" #include "util/AllocatedArray.hxx"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <memory> #include <memory>
#include <stdint.h>
/** /**
* A dynamically allocated buffer. It is used to pass * A dynamically allocated buffer. It is used to pass
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "util/ReusableArray.hxx" #include "util/ReusableArray.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
/** /**
* Manager for a temporary buffer which grows as needed. We could * Manager for a temporary buffer which grows as needed. We could
......
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <cstdint>
#include <limits> #include <limits>
#include <stdint.h>
enum class SampleFormat : uint8_t; enum class SampleFormat : uint8_t;
template<SampleFormat F> struct SampleTraits; template<SampleFormat F> struct SampleTraits;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_PCM_DITHER_HXX #ifndef MPD_PCM_DITHER_HXX
#define MPD_PCM_DITHER_HXX #define MPD_PCM_DITHER_HXX
#include <stdint.h> #include <cstdint>
enum class SampleFormat : uint8_t; enum class SampleFormat : uint8_t;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "Buffer.hxx" #include "Buffer.hxx"
#include "RestBuffer.hxx" #include "RestBuffer.hxx"
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "Buffer.hxx" #include "Buffer.hxx"
#include "RestBuffer.hxx" #include "RestBuffer.hxx"
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -35,8 +35,7 @@ or implied, of Sebastian Gesemann. ...@@ -35,8 +35,7 @@ or implied, of Sebastian Gesemann.
#include <array> #include <array>
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
/** /**
* A "dsd2pcm engine" for one channel. * A "dsd2pcm engine" for one channel.
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "Buffer.hxx" #include "Buffer.hxx"
#include "RestBuffer.hxx" #include "RestBuffer.hxx"
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "Dop.hxx" #include "Dop.hxx"
#endif #endif
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <stdint.h> #include <cstdint>
/** /**
* Interleave planar PCM samples from #src to #dest. * Interleave planar PCM samples from #src to #dest.
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef PCM_PACK_HXX #ifndef PCM_PACK_HXX
#define PCM_PACK_HXX #define PCM_PACK_HXX
#include <stdint.h> #include <cstdint>
/** /**
* Converts padded 24 bit samples (4 bytes per sample) to packed 24 * Converts padded 24 bit samples (4 bytes per sample) to packed 24
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_PCM_CHANNELS_HXX #ifndef MPD_PCM_CHANNELS_HXX
#define MPD_PCM_CHANNELS_HXX #define MPD_PCM_CHANNELS_HXX
#include <stdint.h> #include <cstdint>
class PcmBuffer; class PcmBuffer;
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "Buffer.hxx" #include "Buffer.hxx"
#include "Dsd2Pcm.hxx" #include "Dsd2Pcm.hxx"
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "SampleFormat.hxx" #include "SampleFormat.hxx"
#include <stdint.h> #include <cstdint>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
class PcmBuffer; class PcmBuffer;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <stdint.h> #include <cstdint>
#if defined(_WIN32) #if defined(_WIN32)
/* on WIN32, "FLOAT" is already defined, and this triggers -Wshadow */ /* on WIN32, "FLOAT" is already defined, and this triggers -Wshadow */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_PCM_SILENCE_HXX #ifndef MPD_PCM_SILENCE_HXX
#define MPD_PCM_SILENCE_HXX #define MPD_PCM_SILENCE_HXX
#include <stdint.h> #include <cstdint>
template<typename T> struct WritableBuffer; template<typename T> struct WritableBuffer;
enum class SampleFormat : uint8_t; enum class SampleFormat : uint8_t;
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "SampleFormat.hxx" #include "SampleFormat.hxx"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
/** /**
* This template describes the specified #SampleFormat. This is an * This template describes the specified #SampleFormat. This is an
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include "Dither.cxx" // including the .cxx file to get inlined templates #include "Dither.cxx" // including the .cxx file to get inlined templates
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
#include <string.h> #include <string.h>
#if GCC_OLDER_THAN(8,0) #if GCC_OLDER_THAN(8,0)
......
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
#include "ReplayGainMode.hxx" #include "ReplayGainMode.hxx"
#include "MusicChunkPtr.hxx" #include "MusicChunkPtr.hxx"
#include <cstdint>
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <stdint.h>
struct Tag; struct Tag;
class PlayerListener; class PlayerListener;
class PlayerOutputs; class PlayerOutputs;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef MPD_PROTOCOL_ARGPARSER_HXX #ifndef MPD_PROTOCOL_ARGPARSER_HXX
#define MPD_PROTOCOL_ARGPARSER_HXX #define MPD_PROTOCOL_ARGPARSER_HXX
#include <stdint.h> #include <cstdint>
struct RangeArg; struct RangeArg;
class SongTime; class SongTime;
......
...@@ -26,10 +26,9 @@ ...@@ -26,10 +26,9 @@
#include "util/LazyRandomEngine.hxx" #include "util/LazyRandomEngine.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <utility> #include <utility>
#include <stdint.h>
class DetachedSong; class DetachedSong;
/** /**
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef MPD_QUEUE_PRINT_HXX #ifndef MPD_QUEUE_PRINT_HXX
#define MPD_QUEUE_PRINT_HXX #define MPD_QUEUE_PRINT_HXX
#include <stdint.h> #include <cstdint>
struct Queue; struct Queue;
class SongFilter; class SongFilter;
......
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
#include "AndSongFilter.hxx" #include "AndSongFilter.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <cstdint>
#include <string> #include <string>
#include <stdint.h>
/** /**
* Special value for the db_selection_print() sort parameter. * Special value for the db_selection_print() sort parameter.
*/ */
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "ISongFilter.hxx" #include "ISongFilter.hxx"
#include "StringFilter.hxx" #include "StringFilter.hxx"
#include <stdint.h> #include <cstdint>
enum TagType : uint8_t; enum TagType : uint8_t;
struct Tag; struct Tag;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <chrono> #include <chrono>
#include <stdint.h> #include <cstdint>
struct StorageFileInfo { struct StorageFileInfo {
enum class Type : uint8_t { enum class Type : uint8_t {
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
#include "UniqueFileDescriptor.hxx" #include "UniqueFileDescriptor.hxx"
#include <cstdint>
#include <sys/epoll.h> #include <sys/epoll.h>
#include <stdint.h>
/** /**
* A class that wraps Linux epoll. * A class that wraps Linux epoll.
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include "system/Error.hxx" #include "system/Error.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "util/ByteOrder.hxx" #include "util/ByteOrder.hxx"
#include <cstdint>
#include <limits> #include <limits>
#include <stdexcept> #include <stdexcept>
#include <stdint.h>
#include <string.h> #include <string.h>
struct aiff_header { struct aiff_header {
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <memory> #include <memory>
#include <stdint.h>
#include <string.h> #include <string.h>
struct ApeFooter { struct ApeFooter {
......
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <cstdint>
#include <string> #include <string>
#include <stdint.h>
static StringView static StringView
ReadString(ConstBuffer<uint8_t> &src) noexcept ReadString(ConstBuffer<uint8_t> &src) noexcept
{ {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Type.h" #include "Type.h"
#include <stdint.h> #include <cstdint>
class TagMask { class TagMask {
typedef uint_least32_t mask_t; typedef uint_least32_t mask_t;
......
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <cassert> #include <cassert>
#include <cstdint>
#include <limits> #include <limits>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
Mutex tag_pool_lock; Mutex tag_pool_lock;
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "util/ByteOrder.hxx" #include "util/ByteOrder.hxx"
#include <cstdint>
#include <limits> #include <limits>
#include <stdexcept> #include <stdexcept>
#include <stdint.h>
#include <string.h> #include <string.h>
struct riff_header { struct riff_header {
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#include <id3tag.h> #include <id3tag.h>
#include <stdint.h> #include <cstdint>
#include <string.h> #include <string.h>
enum class Rva2Channel : uint8_t { enum class Rva2Channel : uint8_t {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define MPD_TAG_TYPE_H #define MPD_TAG_TYPE_H
#ifdef __cplusplus #ifdef __cplusplus
#include <stdint.h> #include <cstdint>
#endif #endif
/** /**
......
...@@ -33,8 +33,7 @@ ...@@ -33,8 +33,7 @@
#include <fileapi.h> #include <fileapi.h>
#include <chrono> #include <chrono>
#include <cstdint>
#include <stdint.h>
constexpr uint64_t constexpr uint64_t
ConstructUint64(DWORD lo, DWORD hi) noexcept ConstructUint64(DWORD lo, DWORD hi) noexcept
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Compiler.h" #include "Compiler.h"
#include <stdint.h> #include <cstdint>
/** /**
* @see http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv * @see http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "Compiler.h" #include "Compiler.h"
#include <stdint.h> #include <cstdint>
#if defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__) #if defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__)
/* well-known little-endian */ /* well-known little-endian */
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#define MPD_BYTE_REVERSE_HXX #define MPD_BYTE_REVERSE_HXX
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
/** /**
* Reverse the bytes in each 16 bit "frame". This function can be * Reverse the bytes in each 16 bit "frame". This function can be
......
...@@ -35,8 +35,7 @@ ...@@ -35,8 +35,7 @@
#include "Compiler.h" #include "Compiler.h"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
/** /**
* Format the given byte sequence into a null-terminated hexadecimal * Format the given byte sequence into a null-terminated hexadecimal
......
...@@ -103,7 +103,7 @@ HugeDiscard(void *p, size_t size) noexcept ...@@ -103,7 +103,7 @@ HugeDiscard(void *p, size_t size) noexcept
/* not Linux: fall back to standard C calls */ /* not Linux: fall back to standard C calls */
#include <stdint.h> #include <cstdint>
static inline WritableBuffer<void> static inline WritableBuffer<void>
HugeAllocate(size_t size) HugeAllocate(size_t size)
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#define NUMBER_PARSER_HXX #define NUMBER_PARSER_HXX
#include <cassert> #include <cassert>
#include <cstdint>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
struct StringView; struct StringView;
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#include "Compiler.h" #include "Compiler.h"
#include <cstddef> #include <cstddef>
#include <cstdint>
#include <stdint.h>
template<typename T> struct WritableBuffer; template<typename T> struct WritableBuffer;
template<typename T> class DynamicFifoBuffer; template<typename T> class DynamicFifoBuffer;
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
#include "CharUtil.hxx" #include "CharUtil.hxx"
#include <algorithm> #include <algorithm>
#include <cstdint>
#include <stdint.h>
/** /**
* Is this a leading byte that is followed by 1 continuation byte? * Is this a leading byte that is followed by 1 continuation byte?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment