Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check _WIN32 rather than WIN32 #22

Merged
merged 2 commits into from Feb 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/RInside.cpp
Expand Up @@ -22,7 +22,7 @@

#include <RInside.h>
#include <Callbacks.h>
#ifndef WIN32
#ifndef _WIN32
#define R_INTERFACE_PTRS
#include <Rinterface.h>
#endif
Expand All @@ -31,7 +31,7 @@ RInside* RInside::instance_m = 0 ;

const char *programName = "RInside";

#ifdef WIN32
#ifdef _WIN32
// on Windows, we need to provide setenv which is in the file setenv.c here
#include "setenv/setenv.c"
extern int optind;
Expand All @@ -58,7 +58,7 @@ RInside::RInside(): global_env_m(NULL)
initialize(0, 0, false, false, false);
}

#ifdef WIN32
#ifdef _WIN32
static int myReadConsole(const char *prompt, char *buf, int len, int addtohistory) {
fputs(prompt, stdout);
fflush(stdout);
Expand Down Expand Up @@ -117,7 +117,7 @@ void RInside::initialize(const int argc, const char* const argv[], const bool lo
// generated from Makevars{.win}
#include "RInsideEnvVars.h"

#ifdef WIN32
#ifdef _WIN32
// we need a special case for Windows where users may deploy an RInside binary from CRAN
// which will have R_HOME set at compile time to CRAN's value -- so let's try to correct
// this here: a) allow user's setting of R_HOME and b) use R's get_R_HOME() function
Expand All @@ -139,7 +139,7 @@ void RInside::initialize(const int argc, const char* const argv[], const bool lo
}
}

#ifndef WIN32
#ifndef _WIN32
R_SignalHandlers = 0; // Don't let R set up its own signal handlers
#endif

Expand All @@ -150,7 +150,7 @@ void RInside::initialize(const int argc, const char* const argv[], const bool lo
int R_argc = sizeof(R_argv) / sizeof(R_argv[0]);
Rf_initEmbeddedR(R_argc, (char**)R_argv);

#ifndef WIN32
#ifndef _WIN32
R_CStackLimit = -1; // Don't do any stack checking, see R Exts, '8.1.5 Threading issues'
#endif

Expand All @@ -159,7 +159,7 @@ void RInside::initialize(const int argc, const char* const argv[], const bool lo
structRstart Rst;
R_DefParams(&Rst);
Rst.R_Interactive = (Rboolean) interactive_m; // sets interactive() to eval to false
#ifdef WIN32
#ifdef _WIN32
Rst.rhome = getenv("R_HOME"); // which is set above as part of R_VARS
Rst.home = getRUser();
Rst.CharacterMode = LinkDLL;
Expand Down Expand Up @@ -472,7 +472,7 @@ void RInside_Busy( int which ){
void RInside::set_callbacks(Callbacks* callbacks_){
callbacks = callbacks_ ;

#ifdef WIN32
#ifdef _WIN32
// do something to tell user that he doesn't get this
#else

Expand Down