Unverified Commit 4bf7d903 authored by Vitalii Koshura's avatar Vitalii Koshura Committed by GitHub

Merge pull request #4001 from BOINC/dpa_win_cleanup

Win code cleanup; no functional changes
parents f034fb00 3becfaab
......@@ -18,10 +18,6 @@
// platform-independent part of graphics library
//
#ifdef _MSC_VER
#define strdup _strdup
#define snprintf _snprintf
#endif
#ifdef _WIN32
#include <boinc_win.h>
#endif
......@@ -45,7 +41,7 @@ bool throttled_app_render(int x, int y, double t) {
static double time_until_render = 0;
static double last_now = 0;
static double elapsed_time = 0;
double now, t0, t1, diff, frac;
double now, t0=0, t1, diff, frac;
bool ok_to_render = true;
now = dtime();
......
......@@ -52,10 +52,6 @@
#include <cstdlib>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "file_names.h"
......@@ -220,7 +216,7 @@ int ACTIVE_TASK::preempt(int preempt_type, int reason) {
if (task_state() != PROCESS_EXECUTING) return 0;
return suspend();
}
return 0;
// not reached
}
#ifndef SIM
......
......@@ -22,9 +22,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#include "win_util.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#ifndef STATUS_SUCCESS
#define STATUS_SUCCESS 0x0 // may be in ntstatus.h
#endif
......
......@@ -22,12 +22,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#include "win_util.h"
#define unlink _unlink
#ifdef _MSC_VER
#define snprintf _snprintf
#define strdup _strdup
#define getcwd _getcwd
#endif
#else
#include "config.h"
#if HAVE_SCHED_SETSCHEDULER && defined (__linux__)
......@@ -845,8 +839,10 @@ int ACTIVE_TASK::start(bool test) {
// see which one was used for this job, and show it
//
if (log_flags.task_debug && gstate.host_info.n_processor_groups > 0) {
int i = get_processor_group(process_handle);
msg_printf(wup->project, MSG_INFO, "[task_debug] task is running in processor group %d", i);
msg_printf(wup->project, MSG_INFO,
"[task_debug] task is running in processor group %d",
get_processor_group(process_handle)
);
}
#endif
#elif defined(__EMX__)
......@@ -1280,7 +1276,7 @@ void run_test_app() {
at.max_mem_usage = 1e14;
safe_strcpy(at.slot_dir, ".");
#if 1
#if 0
// test file copy
//
ASYNC_COPY* ac = new ASYNC_COPY;
......
......@@ -27,10 +27,6 @@
#include <string.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "crypt.h"
#include "error_numbers.h"
#include "filesys.h"
......
......@@ -19,13 +19,6 @@
//
// usage: boinc_log [--host hostname] [--passwd passwd]
#if defined(_WIN32) && !defined(__CYGWIN32__)
#define snprintf _snprintf
#define strdate _strdate
#define strtime _strtime
#define chdir _chdir
#endif
#ifdef _WIN32
#include "boinc_win.h"
#include "win_util.h"
......
......@@ -17,7 +17,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#define snprintf _snprintf
#else
#include "config.h"
#include <cstdarg>
......
......@@ -43,10 +43,6 @@ extern int compareOSVersionTo(int toMajor, int toMinor);
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#ifdef __EMX__
#define INCL_DOS
#include <os2.h>
......
......@@ -37,10 +37,6 @@
#include <cstring>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "log_flags.h"
......
......@@ -54,10 +54,6 @@
#include <ctime>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "file_names.h"
#include "filesys.h"
......
......@@ -30,10 +30,6 @@
#include <sys/types.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "md5_file.h"
#include "crypt.h"
#include "str_replace.h"
......
......@@ -24,10 +24,6 @@
#include <string>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "parse.h"
#include "url.h"
#include "filesys.h"
......
......@@ -34,10 +34,6 @@
#include <set>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "crypt.h"
#include "error_numbers.h"
#include "file_names.h"
......
......@@ -28,10 +28,6 @@
#include "mac_spawn.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "md5_file.h"
......
......@@ -27,10 +27,6 @@
#include <cstring>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "file_names.h"
#include "filesys.h"
......
......@@ -81,7 +81,7 @@ int dhrystone(
){
One_Fifty Int_1_Loc;
REG One_Fifty Int_2_Loc;
One_Fifty Int_3_Loc;
One_Fifty Int_3_Loc=0;
REG char Ch_Index;
Enumeration Enum_Loc;
Str_30 Str_1_Loc;
......
......@@ -19,9 +19,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#include "config.h"
#include <cstdio>
......
......@@ -23,10 +23,6 @@
#include "config.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "str_replace.h"
#include "file_names.h"
......
......@@ -23,9 +23,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#ifdef __APPLE__
// Suppress obsolete warning when building for OS 10.3.9
......
......@@ -59,10 +59,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#include "win_util.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#define chdir _chdir
#endif
#else
#include "config.h"
#include <setjmp.h>
......
......@@ -67,9 +67,7 @@
#endif
#include "nvapi.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#ifdef __APPLE__
// Suppress obsolete warning when building for OS 10.3.9
......
......@@ -21,9 +21,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#ifdef __APPLE__
// Suppress obsolete warning when building for OS 10.3.9
......
......@@ -53,10 +53,6 @@
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "network.h"
......
......@@ -19,11 +19,6 @@
#include "boinc_win.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#define snprintf_s _snprintf_s
#endif
#ifdef HAVE_INTRIN_H
#include <intrin.h>
#endif
......
......@@ -19,11 +19,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#ifdef _MSC_VER
#define unlink _unlink
#define chdir _chdir
#define snprintf _snprintf
#endif
#else
#include "config.h"
#include <cstring>
......
......@@ -19,10 +19,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#ifdef _MSC_VER
#define chdir _chdir
#define snprintf _snprintf
#endif
#else
#include "config.h"
#include <cstdio>
......
......@@ -25,10 +25,6 @@
#include "boinc_win.h"
#include "sysmon_win.h"
#include "win_util.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#include "config.h"
#if HAVE_SYS_SOCKET_H
......
......@@ -18,21 +18,14 @@
#include <boinc_win.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include <string.h>
#include "str_replace.h"
#include "url.h"
#include "client_msgs.h"
#include "client_state.h"
#include "log_flags.h"
#include "result.h"
#include "sandbox.h"
#include "project.h"
PROJECT::PROJECT() {
......
......@@ -22,10 +22,6 @@
#include <math.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "str_replace.h"
#include "parse.h"
......
......@@ -44,10 +44,6 @@
#include "config.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "client_msgs.h"
#include "client_state.h"
#include "coproc.h"
......
......@@ -29,10 +29,6 @@
#include <grp.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "file_names.h"
#include "util.h"
......
......@@ -27,10 +27,6 @@
#include <ctime>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "parse.h"
......
......@@ -17,10 +17,6 @@
#include "boinc_win.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "diagnostics.h"
#include "error_numbers.h"
#include "filesys.h"
......
......@@ -30,10 +30,6 @@
#endif
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "filesys.h"
#include "parse.h"
......
......@@ -24,10 +24,6 @@
#include <cmath>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "util.h"
#include "str_replace.h"
......
......@@ -263,7 +263,7 @@ bool CWizardAttach::Run(
wxString strProjectDescription,
wxString strProjectKnown,
bool bAccountKeyDetected,
bool bEmbedded
bool /* bEmbedded */
){
SetProjectName(strProjectName);
if (strProjectURL.size()) {
......
......@@ -32,10 +32,6 @@
#include <sys/socket.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "boinc_gl.h"
#include "diagnostics.h"
......
......@@ -30,12 +30,15 @@
#pragma warning(disable: 4127) // constant conditional expression
#pragma warning(disable: 4244) // conversion from int to char
#define chdir _chdir
#define finite _finite
#define getpid _getpid
#define getcwd _getcwd
#define strdate _strdate
#define strdup _strdup
#define stricmp _stricmp
#define strtime _strtime
#define unlink _unlink
#define snprintf_s _snprintf_s
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
......@@ -44,6 +47,8 @@
#ifdef __MINGW32__
#define strdate _strdate
#define strtime _strtime
#define getcwd _getcwd
#define finite _finite
#endif
#ifndef HAVE_CONFIG_H
......
......@@ -30,9 +30,6 @@
#ifdef _WIN32
#include "win_util.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#ifdef __APPLE__
// Suppress obsolete warning when building for OS 10.3.9
......
......@@ -28,11 +28,6 @@
#include <fcntl.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#define strdup _strdup
#endif
#include <openssl/ssl.h>
#include <openssl/md5.h>
#include <openssl/bio.h>
......
......@@ -24,11 +24,6 @@
#include <fcntl.h>
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
#define getcwd _getcwd
#define snprintf _snprintf
#endif
#if !defined(_WIN32) || defined(__CYGWIN32__)
#include "config.h"
#ifdef _USING_FCGI_
......
......@@ -21,9 +21,6 @@
#ifdef _WIN32
#include "boinc_win.h"
#include "../version.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#else
#include "config.h"
#ifdef __EMX__
......
......@@ -30,10 +30,6 @@
#include <wincrypt.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#ifdef ANDROID
#include <stdlib.h>
#endif
......
......@@ -35,10 +35,6 @@
#include <errno.h>
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#include "error_numbers.h"
#include "str_util.h"
#include "util.h"
......
......@@ -30,9 +30,6 @@
#ifdef _WIN32
#include "win_util.h"
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#endif
#include "miofile.h"
#include "parse.h"
......
......@@ -21,10 +21,6 @@
#include "boinc_win.h"
#endif
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
#ifdef __EMX__
#define INCL_DOS
#define INCL_DOSERRORS
......
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