aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-09-28 00:40:00 +0200
committerMax Kellermann <max@duempel.org>2012-09-28 00:40:00 +0200
commitd0c3fa015039e005af658619fd7b4289c9abcd6f (patch)
tree2391eabdabd522fdd32cc75518821ced1b59983b
parent609f6ce66de4d100388531db5a420f155b7bf64d (diff)
main: use C++ compiler
-rw-r--r--Makefile.am7
-rw-r--r--src/DatabasePlaylist.cxx2
-rw-r--r--src/Main.cxx (renamed from src/main.c)16
-rw-r--r--src/Main.hxx (renamed from src/main.h)6
-rw-r--r--src/OtherCommands.cxx2
-rw-r--r--src/PlaylistCommands.cxx2
-rw-r--r--src/PlaylistFile.cxx2
-rw-r--r--src/PlaylistFile.hxx (renamed from src/PlaylistFile.h)14
-rw-r--r--src/PlaylistMapper.cxx2
-rw-r--r--src/PlaylistPrint.cxx2
-rw-r--r--src/PlaylistSave.cxx2
-rw-r--r--src/Win32Main.cxx (renamed from src/main_win32.c)5
-rw-r--r--src/client_event.c2
-rw-r--r--src/listen.c2
-rw-r--r--src/player_control.c2
-rw-r--r--src/player_thread.c2
-rw-r--r--src/playlist_global.c2
-rw-r--r--src/sig_handlers.c2
-rw-r--r--src/update.c2
-rw-r--r--src/update_remove.c2
20 files changed, 39 insertions, 39 deletions
diff --git a/Makefile.am b/Makefile.am
index 7b9c49e9..98a7713a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -124,7 +124,6 @@ mpd_headers = \
src/listen.h \
src/log.h \
src/ls.h \
- src/main.h \
src/mixer_all.h \
src/mixer_api.h \
src/mixer_control.h \
@@ -300,8 +299,8 @@ src_mpd_SOURCES = \
src/log.c \
src/ls.c \
src/io_thread.c src/io_thread.h \
- src/main.c \
- src/main_win32.c \
+ src/Main.cxx src/Main.hxx \
+ src/Win32Main.cxx \
src/event_pipe.c \
src/daemon.c \
src/AudioCompress/compress.c \
@@ -356,7 +355,7 @@ src_mpd_SOURCES = \
src/string_util.c \
src/volume.c \
src/SongFilter.cxx src/SongFilter.hxx \
- src/PlaylistFile.cxx src/PlaylistFile.h \
+ src/PlaylistFile.cxx src/PlaylistFile.hxx \
src/timer.c
#
diff --git a/src/DatabasePlaylist.cxx b/src/DatabasePlaylist.cxx
index 3020b327..fb477e83 100644
--- a/src/DatabasePlaylist.cxx
+++ b/src/DatabasePlaylist.cxx
@@ -20,7 +20,7 @@
#include "config.h"
#include "DatabasePlaylist.hxx"
#include "DatabaseSelection.hxx"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
diff --git a/src/main.c b/src/Main.cxx
index 39778aad..05755139 100644
--- a/src/main.c
+++ b/src/Main.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,11 @@
*/
#include "config.h"
-#include "main.h"
+#include "Main.hxx"
+#include "PlaylistFile.hxx"
+#include "chunk.h"
+
+extern "C" {
#include "daemon.h"
#include "io_thread.h"
#include "client.h"
@@ -26,7 +30,6 @@
#include "idle.h"
#include "AllCommands.h"
#include "playlist.h"
-#include "PlaylistFile.h"
#include "database.h"
#include "update.h"
#include "player_thread.h"
@@ -35,7 +38,6 @@
#include "conf.h"
#include "path.h"
#include "mapper.h"
-#include "chunk.h"
#include "player_control.h"
#include "stats.h"
#include "sig_handlers.h"
@@ -53,8 +55,12 @@
#include "tag.h"
#include "zeroconf.h"
#include "event_pipe.h"
+}
+
#include "mpd_error.h"
+extern "C" {
+
#ifdef ENABLE_INOTIFY
#include "inotify_update.h"
#endif
@@ -67,6 +73,8 @@
#include "archive_list.h"
#endif
+}
+
#include <glib.h>
#include <unistd.h>
diff --git a/src/main.h b/src/Main.hxx
index 2a7d7591..54916ff4 100644
--- a/src/main.h
+++ b/src/Main.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MAIN_H
-#define MAIN_H
+#ifndef MPD_MAIN_HXX
+#define MPD_MAIN_HXX
#include <glib.h>
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index 2c714507..a703a2ff 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -37,7 +37,7 @@ extern "C" {
#include "permission.h"
}
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
extern "C" {
#include "client.h"
diff --git a/src/PlaylistCommands.cxx b/src/PlaylistCommands.cxx
index f6f43f65..2b5f0b2c 100644
--- a/src/PlaylistCommands.cxx
+++ b/src/PlaylistCommands.cxx
@@ -23,7 +23,7 @@
#include "CommandError.hxx"
#include "PlaylistPrint.hxx"
#include "PlaylistSave.hxx"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
extern "C" {
#include "protocol/argparser.h"
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index 462060f0..cb86c13a 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
#include "PlaylistSave.hxx"
#include "song.h"
diff --git a/src/PlaylistFile.h b/src/PlaylistFile.hxx
index ddd2a47e..b20f0d76 100644
--- a/src/PlaylistFile.h
+++ b/src/PlaylistFile.hxx
@@ -17,14 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_STORED_PLAYLIST_H
-#define MPD_STORED_PLAYLIST_H
+#ifndef MPD_PLAYLIST_FILE_HXX
+#define MPD_PLAYLIST_FILE_HXX
-#ifdef __cplusplus
#include <list>
#include <vector>
#include <string>
-#endif
#include <glib.h>
#include <stdbool.h>
@@ -32,8 +30,6 @@
struct song;
-#ifdef __cplusplus
-
struct PlaylistFileInfo {
std::string name;
@@ -44,20 +40,14 @@ typedef std::list<PlaylistFileInfo> PlaylistFileList;
typedef std::vector<std::string> PlaylistFileContents;
-#endif
-
extern bool playlist_saveAbsolutePaths;
-G_BEGIN_DECLS
-
/**
* Perform some global initialization, e.g. load configuration values.
*/
void
spl_global_init(void);
-G_END_DECLS
-
#ifdef __cplusplus
/**
diff --git a/src/PlaylistMapper.cxx b/src/PlaylistMapper.cxx
index 415f8ba2..39ac043e 100644
--- a/src/PlaylistMapper.cxx
+++ b/src/PlaylistMapper.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "PlaylistMapper.h"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
extern "C" {
#include "playlist_list.h"
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index 4f50825b..40b895f8 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "PlaylistPrint.hxx"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
#include "QueuePrint.hxx"
extern "C" {
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx
index 4c8af627..8d1908aa 100644
--- a/src/PlaylistSave.cxx
+++ b/src/PlaylistSave.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "PlaylistSave.hxx"
-#include "PlaylistFile.h"
+#include "PlaylistFile.hxx"
#include "song.h"
extern "C" {
diff --git a/src/main_win32.c b/src/Win32Main.cxx
index aac7ad88..8543ea10 100644
--- a/src/main_win32.c
+++ b/src/Win32Main.cxx
@@ -18,12 +18,15 @@
*/
#include "config.h"
-#include "main.h"
+#include "Main.hxx"
#ifdef WIN32
#include "mpd_error.h"
+
+extern "C" {
#include "event_pipe.h"
+}
#include <glib.h>
diff --git a/src/client_event.c b/src/client_event.c
index dbcd35c4..5680e557 100644
--- a/src/client_event.c
+++ b/src/client_event.c
@@ -19,7 +19,7 @@
#include "config.h"
#include "client_internal.h"
-#include "main.h"
+#include "Main.hxx"
#include <assert.h>
diff --git a/src/listen.c b/src/listen.c
index 90e13b9c..28709a0e 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -22,7 +22,7 @@
#include "server_socket.h"
#include "client.h"
#include "conf.h"
-#include "main.h"
+#include "Main.hxx"
#include <string.h>
#include <assert.h>
diff --git a/src/player_control.c b/src/player_control.c
index d9aa2b94..5a16520c 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -26,7 +26,7 @@
#include "song.h"
#include "idle.h"
#include "pcm_volume.h"
-#include "main.h"
+#include "Main.hxx"
#include <assert.h>
#include <stdio.h>
diff --git a/src/player_thread.c b/src/player_thread.c
index d2682f51..561c595e 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -32,7 +32,7 @@
#include "pipe.h"
#include "chunk.h"
#include "idle.h"
-#include "main.h"
+#include "Main.hxx"
#include "buffer.h"
#include "mpd_error.h"
diff --git a/src/playlist_global.c b/src/playlist_global.c
index 650b88bb..43bf2675 100644
--- a/src/playlist_global.c
+++ b/src/playlist_global.c
@@ -26,7 +26,7 @@
#include "playlist.h"
#include "playlist_state.h"
#include "event_pipe.h"
-#include "main.h"
+#include "Main.hxx"
struct playlist g_playlist;
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index b23f9e77..eabca199 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -23,7 +23,7 @@
#ifndef WIN32
#include "log.h"
-#include "main.h"
+#include "Main.hxx"
#include "event_pipe.h"
#include "mpd_error.h"
diff --git a/src/update.c b/src/update.c
index ef4dfe74..e47db8f0 100644
--- a/src/update.c
+++ b/src/update.c
@@ -30,7 +30,7 @@
#include "update.h"
#include "idle.h"
#include "stats.h"
-#include "main.h"
+#include "Main.hxx"
#include "mpd_error.h"
#include <glib.h>
diff --git a/src/update_remove.c b/src/update_remove.c
index f443f5eb..c2e353c6 100644
--- a/src/update_remove.c
+++ b/src/update_remove.c
@@ -22,7 +22,7 @@
#include "event_pipe.h"
#include "song.h"
#include "playlist.h"
-#include "main.h"
+#include "Main.hxx"
#ifdef ENABLE_SQLITE
#include "sticker.h"