Skip to content

Commit

Permalink
- lib: switch include order to the way it was (general to specific).
Browse files Browse the repository at this point in the history
    Should fix MinGW compile


svn path=/trunk/boinc/; revision=26008
  • Loading branch information
davidpanderson committed Aug 11, 2012
1 parent afb8620 commit 53782b7
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 76 deletions.
7 changes: 7 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -5434,3 +5434,10 @@ David 10 Aug 2012
lib/
synch.cpp
android_log.h

David 10 Aug 2012
- lib: switch include order to the way it was (general to specific).
Should fix MinGW compile

lib/
*.cpp
4 changes: 2 additions & 2 deletions lib/app_ipc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "app_ipc.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -35,6 +33,8 @@
#include "str_util.h"
#include "url.h"

#include "app_ipc.h"

#ifdef _MSC_VER
#define strdup _strdup
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib/base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "base64.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -29,6 +27,8 @@
#include "boinc_fcgi.h"
#endif

#include "base64.h"

using std::string;

// Table of characters coding the 64 values.
Expand Down
7 changes: 1 addition & 6 deletions lib/boinc_fcgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
// It's far better to use overloads in a C++ namespace to fix these issues
// for a variety of reasons.

#include "boinc_fcgi.h"

#include <cstring>

#ifdef _USING_FCGI_
#include "boinc_fcgi.h"

namespace FCGI {

Expand Down Expand Up @@ -100,6 +98,3 @@ void perror(const char *s) {
}

}; // end of namespace FCGI


#endif // _USING_FCGI_
2 changes: 2 additions & 0 deletions lib/cc_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "str_util.h"
#include "url.h"

#include "cc_config.h"

using std::string;

LOG_FLAGS::LOG_FLAGS() {
Expand Down
4 changes: 2 additions & 2 deletions lib/cert_sig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "cert_sig.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -33,6 +31,8 @@
#include "miofile.h"
#include "error_numbers.h"

#include "cert_sig.h"

#ifdef _MSC_VER
#define snprintf _snprintf
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib/coproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "coproc.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand Down Expand Up @@ -51,6 +49,8 @@
#include "str_replace.h"
#include "util.h"

#include "coproc.h"

#ifndef _USING_FCGI_
using std::perror;
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib/crypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "crypt.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand Down Expand Up @@ -55,6 +53,8 @@
#include "filesys.h"
#include "error_numbers.h"

#include "crypt.h"

// NOTE: the fast CGI I/O library doesn't have fscanf(),
// so some of the following have been modified to use
// fgets() and sscanf() instead
Expand Down
3 changes: 1 addition & 2 deletions lib/diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// Stuff related to stderr/stdout direction and exception handling;
// used by both core client and by apps

#include "diagnostics.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand Down Expand Up @@ -63,6 +61,7 @@
#include "util.h"
#include "parse.h"

#include "diagnostics.h"

#if defined(_WIN32) && defined(_MSC_VER)

Expand Down
4 changes: 2 additions & 2 deletions lib/diagnostics_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// Stuff related to catching SEH exceptions, monitoring threads, and trapping
// debugger messages; used by both core client and by apps.

#include "diagnostics_win.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -42,6 +40,8 @@
#include "util.h"
#include "version.h"

#include "diagnostics_win.h"

// NtQuerySystemInformation
typedef NTSTATUS (WINAPI *tNTQSI)(
ULONG SystemInformationClass,
Expand Down
1 change: 1 addition & 0 deletions lib/filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#include "str_util.h"
#include "str_replace.h"
#include "error_numbers.h"

#include "filesys.h"

#ifdef _WIN32
Expand Down
4 changes: 2 additions & 2 deletions lib/gui_rpc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "boinc_win.h"
#endif

#include "gui_rpc_client.h"

#ifdef _WIN32
#include "../version.h"
#ifdef _MSC_VER
Expand Down Expand Up @@ -54,6 +52,8 @@
#include "network.h"
#include "common_defs.h"

#include "gui_rpc_client.h"

using std::string;
using std::vector;

Expand Down
4 changes: 2 additions & 2 deletions lib/gui_rpc_client_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
#include "boinc_win.h"
#endif

#include "gui_rpc_client.h"

#ifdef _WIN32
#include "../version.h"
#else
Expand All @@ -73,6 +71,8 @@
#include "network.h"
#include "common_defs.h"

#include "gui_rpc_client.h"

using std::string;
using std::vector;
using std::sort;
Expand Down
4 changes: 2 additions & 2 deletions lib/gui_rpc_client_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// This file is code to print (in ASCII) the stuff returned by GUI RPC.
// Used only by boinccmd.

#include "gui_rpc_client.h"

#if defined(_WIN32) && !defined(__STDWX_H__) && !defined(_BOINC_WIN_) && !defined(_AFX_STDAFX_H_)
#include "boinc_win.h"
#endif
Expand All @@ -46,6 +44,8 @@
#include "str_util.h"
#include "util.h"

#include "gui_rpc_client.h"

using std::string;
using std::vector;

Expand Down
4 changes: 2 additions & 2 deletions lib/hostinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
// Write and parse HOST_INFO structures.
// Used by client and GUI

#include "hostinfo.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -38,6 +36,8 @@
#include "parse.h"
#include "util.h"

#include "hostinfo.h"

HOST_INFO::HOST_INFO() {
clear_host_info();
}
Expand Down
4 changes: 2 additions & 2 deletions lib/md5_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "md5_file.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -41,6 +39,8 @@
#include "error_numbers.h"
#include "md5.h"

#include "md5_file.h"

int md5_file(const char* path, char* output, double& nbytes) {
unsigned char buf[4096];
unsigned char binout[16];
Expand Down
4 changes: 2 additions & 2 deletions lib/mem_usage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "mem_usage.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -43,6 +41,8 @@

#include "error_numbers.h"

#include "mem_usage.h"

using std::FILE;
using std::fread;
using std::fopen;
Expand Down
4 changes: 2 additions & 2 deletions lib/mfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "mfile.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -38,6 +36,8 @@
#include "error_numbers.h"
#include "filesys.h"

#include "mfile.h"

MFILE::MFILE() {
buf = (char*)malloc(64*1024);
len = 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/miofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "miofile.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -30,6 +28,8 @@

#include "error_numbers.h"

#include "miofile.h"

using std::string;

MIOFILE::MIOFILE() {
Expand Down
4 changes: 2 additions & 2 deletions lib/msg_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "msg_log.h"

#ifdef _WIN32
#include "boinc_win.h"
#else
Expand All @@ -32,6 +30,8 @@
#include "str_util.h"
#include "util.h"

#include "msg_log.h"

using std::string;

// MSG_LOG is a base class for writing messages not intended for the end user.
Expand Down
4 changes: 2 additions & 2 deletions lib/msg_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

// interfaces for accessing message queues

#include "msg_queue.h"

#include "config.h"
#include <cstdio>
#include <cstring>
Expand All @@ -27,6 +25,8 @@
#include <unistd.h>
#endif

#include "msg_queue.h"

using std::perror;

int create_message_queue(key_t key) {
Expand Down
4 changes: 2 additions & 2 deletions lib/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "network.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#include <fcntl.h>
Expand All @@ -42,6 +40,8 @@

#include "error_numbers.h"

#include "network.h"

using std::perror;
using std::sprintf;

Expand Down
4 changes: 2 additions & 2 deletions lib/notice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#include "notice.h"

#if defined(_WIN32) && !defined(__STDWX_H__)
#include "boinc_win.h"
#elif defined(_WIN32) && defined(__STDWX_H__)
Expand All @@ -25,6 +23,8 @@

#include "error_numbers.h"

#include "notice.h"

NOTICE::NOTICE() {
clear();
}
Expand Down
Loading

0 comments on commit 53782b7

Please sign in to comment.