#endif
// This is a bit messy because we define link ourself
-#ifndef __BORLANDC__
-#define link NoLiNk
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
+
#include <unistd.h>
-#undef link
+
#else
// No unistd.h in Borland C++
extern int access(const char *, int);
#define OPTION_NOSTDLIB "-nostdlib"
#define OPTION_NOSTDINC "-nostdinc"
#define OPTION_VERBOSE "-verbose"
+#define OPTION_ANSIINT "-ansiint"
static const char *_preCmd[] = {
"sdcpp", "-Wall", "-lang-c++", "-DSDCC=1",
"$l", "-I" SDCC_INCLUDE_DIR, "$1", "$2", NULL
options.verbose=1;
continue;
}
+
+ if (strcmp(&argv[i][1],OPTION_ANSIINT) == 0) {
+ options.ANSIint=1;
+ continue;
+ }
if (!port->parseOption(&argc, argv, &i))
{
/*-----------------------------------------------------------------*/
/* my_system - will call a program with arguments */
/*-----------------------------------------------------------------*/
+
+#if defined(_MSC_VER)
+
+char *try_dir[]= {NULL}; // TODO : Fill in some default search list
+
+#else
+
char *try_dir[]= {SRCDIR "/bin",PREFIX "/bin", NULL};
+
+#endif
+
int my_system (const char *cmd, char **cmd_argv)
{
char *dir, *got= NULL; int i= 0;
}
if (got)
+ {
i= spawnv(P_WAIT,got,cmd_argv) == -1;
+ free(got) ;
+ }
else
i= spawnvp(P_WAIT,cmd,cmd_argv) == -1;
if (i) {