// This is a bit messy because we define link ourself
#if !defined(__BORLANDC__) && !defined(_MSC_VER)
-#if 0 // Wasn't this fixed already
-#define link NoLiNk
#include <unistd.h>
-#undef link
-#endif
#else
// No unistd.h in Borland C++
extern int access(const char *, int);
#define X_OK 1
+
#endif
//REMOVE ME!!!
#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
#if !OPT_DISABLE_PIC
&pic14_port,
#endif
+#if !OPT_DISABLE_I186
+ &i186_port,
+#endif
+#if !OPT_DISABLE_TLCS900H
+ &tlcs900h_port,
+#endif
};
#define NUM_PORTS (sizeof(_ports)/sizeof(_ports[0]))
exit(1);
}
+static void _validatePorts(void)
+{
+ int i;
+ for (i=0; i<NUM_PORTS; i++) {
+ if (_ports[i]->magic != PORT_MAGIC) {
+ printf("Error: port %s is incomplete.\n", _ports[i]->target);
+ wassert(0);
+ }
+ }
+}
+
void buildCmdLine(char *into, char **args, const char **cmds,
const char *p1, const char *p2,
const char *p3, const char **list)
options.verbose=1;
continue;
}
+
+ if (strcmp(&argv[i][1],OPTION_ANSIINT) == 0) {
+ options.ANSIint=1;
+ continue;
+ }
if (!port->parseOption(&argc, argv, &i))
{
static void _findPort(int argc, char **argv)
{
+ _validatePorts();
+
argc--;
while (argc) {
if (!strncmp(*argv, "-m", 2)) {