Commit d0c3fa01 authored by Max Kellermann's avatar Max Kellermann

main: use C++ compiler

parent 609f6ce6
...@@ -124,7 +124,6 @@ mpd_headers = \ ...@@ -124,7 +124,6 @@ mpd_headers = \
src/listen.h \ src/listen.h \
src/log.h \ src/log.h \
src/ls.h \ src/ls.h \
src/main.h \
src/mixer_all.h \ src/mixer_all.h \
src/mixer_api.h \ src/mixer_api.h \
src/mixer_control.h \ src/mixer_control.h \
...@@ -300,8 +299,8 @@ src_mpd_SOURCES = \ ...@@ -300,8 +299,8 @@ src_mpd_SOURCES = \
src/log.c \ src/log.c \
src/ls.c \ src/ls.c \
src/io_thread.c src/io_thread.h \ src/io_thread.c src/io_thread.h \
src/main.c \ src/Main.cxx src/Main.hxx \
src/main_win32.c \ src/Win32Main.cxx \
src/event_pipe.c \ src/event_pipe.c \
src/daemon.c \ src/daemon.c \
src/AudioCompress/compress.c \ src/AudioCompress/compress.c \
...@@ -356,7 +355,7 @@ src_mpd_SOURCES = \ ...@@ -356,7 +355,7 @@ src_mpd_SOURCES = \
src/string_util.c \ src/string_util.c \
src/volume.c \ src/volume.c \
src/SongFilter.cxx src/SongFilter.hxx \ src/SongFilter.cxx src/SongFilter.hxx \
src/PlaylistFile.cxx src/PlaylistFile.h \ src/PlaylistFile.cxx src/PlaylistFile.hxx \
src/timer.c src/timer.c
# #
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "DatabasePlaylist.hxx" #include "DatabasePlaylist.hxx"
#include "DatabaseSelection.hxx" #include "DatabaseSelection.hxx"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
#include "DatabaseGlue.hxx" #include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx" #include "DatabasePlugin.hxx"
......
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -18,7 +18,11 @@ ...@@ -18,7 +18,11 @@
*/ */
#include "config.h" #include "config.h"
#include "main.h" #include "Main.hxx"
#include "PlaylistFile.hxx"
#include "chunk.h"
extern "C" {
#include "daemon.h" #include "daemon.h"
#include "io_thread.h" #include "io_thread.h"
#include "client.h" #include "client.h"
...@@ -26,7 +30,6 @@ ...@@ -26,7 +30,6 @@
#include "idle.h" #include "idle.h"
#include "AllCommands.h" #include "AllCommands.h"
#include "playlist.h" #include "playlist.h"
#include "PlaylistFile.h"
#include "database.h" #include "database.h"
#include "update.h" #include "update.h"
#include "player_thread.h" #include "player_thread.h"
...@@ -35,7 +38,6 @@ ...@@ -35,7 +38,6 @@
#include "conf.h" #include "conf.h"
#include "path.h" #include "path.h"
#include "mapper.h" #include "mapper.h"
#include "chunk.h"
#include "player_control.h" #include "player_control.h"
#include "stats.h" #include "stats.h"
#include "sig_handlers.h" #include "sig_handlers.h"
...@@ -53,8 +55,12 @@ ...@@ -53,8 +55,12 @@
#include "tag.h" #include "tag.h"
#include "zeroconf.h" #include "zeroconf.h"
#include "event_pipe.h" #include "event_pipe.h"
}
#include "mpd_error.h" #include "mpd_error.h"
extern "C" {
#ifdef ENABLE_INOTIFY #ifdef ENABLE_INOTIFY
#include "inotify_update.h" #include "inotify_update.h"
#endif #endif
...@@ -67,6 +73,8 @@ ...@@ -67,6 +73,8 @@
#include "archive_list.h" #include "archive_list.h"
#endif #endif
}
#include <glib.h> #include <glib.h>
#include <unistd.h> #include <unistd.h>
......
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MAIN_H #ifndef MPD_MAIN_HXX
#define MAIN_H #define MPD_MAIN_HXX
#include <glib.h> #include <glib.h>
......
...@@ -37,7 +37,7 @@ extern "C" { ...@@ -37,7 +37,7 @@ extern "C" {
#include "permission.h" #include "permission.h"
} }
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
extern "C" { extern "C" {
#include "client.h" #include "client.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "CommandError.hxx" #include "CommandError.hxx"
#include "PlaylistPrint.hxx" #include "PlaylistPrint.hxx"
#include "PlaylistSave.hxx" #include "PlaylistSave.hxx"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
extern "C" { extern "C" {
#include "protocol/argparser.h" #include "protocol/argparser.h"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
#include "PlaylistSave.hxx" #include "PlaylistSave.hxx"
#include "song.h" #include "song.h"
......
...@@ -17,14 +17,12 @@ ...@@ -17,14 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_STORED_PLAYLIST_H #ifndef MPD_PLAYLIST_FILE_HXX
#define MPD_STORED_PLAYLIST_H #define MPD_PLAYLIST_FILE_HXX
#ifdef __cplusplus
#include <list> #include <list>
#include <vector> #include <vector>
#include <string> #include <string>
#endif
#include <glib.h> #include <glib.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -32,8 +30,6 @@ ...@@ -32,8 +30,6 @@
struct song; struct song;
#ifdef __cplusplus
struct PlaylistFileInfo { struct PlaylistFileInfo {
std::string name; std::string name;
...@@ -44,20 +40,14 @@ typedef std::list<PlaylistFileInfo> PlaylistFileList; ...@@ -44,20 +40,14 @@ typedef std::list<PlaylistFileInfo> PlaylistFileList;
typedef std::vector<std::string> PlaylistFileContents; typedef std::vector<std::string> PlaylistFileContents;
#endif
extern bool playlist_saveAbsolutePaths; extern bool playlist_saveAbsolutePaths;
G_BEGIN_DECLS
/** /**
* Perform some global initialization, e.g. load configuration values. * Perform some global initialization, e.g. load configuration values.
*/ */
void void
spl_global_init(void); spl_global_init(void);
G_END_DECLS
#ifdef __cplusplus #ifdef __cplusplus
/** /**
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "PlaylistMapper.h" #include "PlaylistMapper.h"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
extern "C" { extern "C" {
#include "playlist_list.h" #include "playlist_list.h"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "PlaylistPrint.hxx" #include "PlaylistPrint.hxx"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
#include "QueuePrint.hxx" #include "QueuePrint.hxx"
extern "C" { extern "C" {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "PlaylistSave.hxx" #include "PlaylistSave.hxx"
#include "PlaylistFile.h" #include "PlaylistFile.hxx"
#include "song.h" #include "song.h"
extern "C" { extern "C" {
......
...@@ -18,12 +18,15 @@ ...@@ -18,12 +18,15 @@
*/ */
#include "config.h" #include "config.h"
#include "main.h" #include "Main.hxx"
#ifdef WIN32 #ifdef WIN32
#include "mpd_error.h" #include "mpd_error.h"
extern "C" {
#include "event_pipe.h" #include "event_pipe.h"
}
#include <glib.h> #include <glib.h>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "client_internal.h" #include "client_internal.h"
#include "main.h" #include "Main.hxx"
#include <assert.h> #include <assert.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "server_socket.h" #include "server_socket.h"
#include "client.h" #include "client.h"
#include "conf.h" #include "conf.h"
#include "main.h" #include "Main.hxx"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "song.h" #include "song.h"
#include "idle.h" #include "idle.h"
#include "pcm_volume.h" #include "pcm_volume.h"
#include "main.h" #include "Main.hxx"
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "pipe.h" #include "pipe.h"
#include "chunk.h" #include "chunk.h"
#include "idle.h" #include "idle.h"
#include "main.h" #include "Main.hxx"
#include "buffer.h" #include "buffer.h"
#include "mpd_error.h" #include "mpd_error.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "playlist.h" #include "playlist.h"
#include "playlist_state.h" #include "playlist_state.h"
#include "event_pipe.h" #include "event_pipe.h"
#include "main.h" #include "Main.hxx"
struct playlist g_playlist; struct playlist g_playlist;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#ifndef WIN32 #ifndef WIN32
#include "log.h" #include "log.h"
#include "main.h" #include "Main.hxx"
#include "event_pipe.h" #include "event_pipe.h"
#include "mpd_error.h" #include "mpd_error.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "update.h" #include "update.h"
#include "idle.h" #include "idle.h"
#include "stats.h" #include "stats.h"
#include "main.h" #include "Main.hxx"
#include "mpd_error.h" #include "mpd_error.h"
#include <glib.h> #include <glib.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "event_pipe.h" #include "event_pipe.h"
#include "song.h" #include "song.h"
#include "playlist.h" #include "playlist.h"
#include "main.h" #include "Main.hxx"
#ifdef ENABLE_SQLITE #ifdef ENABLE_SQLITE
#include "sticker.h" #include "sticker.h"
......
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