diff --git a/examples/nxflat/tests/hello++/Makefile b/examples/nxflat/tests/hello++/Makefile index dc26932193..b1c9977bc1 100644 --- a/examples/nxflat/tests/hello++/Makefile +++ b/examples/nxflat/tests/hello++/Makefile @@ -68,7 +68,7 @@ $(CXXOBJS): %.o: %.cpp # without actually have libstdc++ $(LIBSTDC_STUBS_LIB): - $(MAKE) -C $(LIBSTDC_STUBS_DIR) + $(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR) # BIN1 and BIN2 link just like C code because they contain no # static constructors. BIN1 is equivalent to a C hello world; @@ -76,10 +76,10 @@ $(LIBSTDC_STUBS_LIB): # not statically initialized. $(BIN1): $(OBJS1) - $(XFLATLD) -o $@ $^ + $(NXFLATLD) -o $@ $^ $(BIN2): $(OBJS2) $(LIBSTDC_STUBS_LIB) - $(XFLATLD) -o $@ $^ + $(NXFLATLD) -o $@ $^ # BIN3 and BIN4 require that we include --cxx in the xflat-ld command. # This will instruct xflat-ld that we want it to put togethe the correct diff --git a/examples/nxflat/tests/hello++/hello++2.cpp b/examples/nxflat/tests/hello++/hello++2.cpp index 4f189699e9..3b03bbb0d8 100644 --- a/examples/nxflat/tests/hello++/hello++2.cpp +++ b/examples/nxflat/tests/hello++/hello++2.cpp @@ -59,7 +59,7 @@ public: CThingSayer(void) { printf("CThingSayer::CThingSayer: I am!\n"); - szWhatToSay = NULL; + szWhatToSay = (const char*)NULL; } ~CThingSayer(void) @@ -70,7 +70,7 @@ public: printf("CThingSayer::~CThingSayer: I will never say '%s' again\n", szWhatToSay); } - szWhatToSay = NULL; + szWhatToSay = (const char*)NULL; } void Initialize(const char *czSayThis) diff --git a/examples/nxflat/tests/hello++/hello++3.cpp b/examples/nxflat/tests/hello++/hello++3.cpp index b41d096643..236f5def0b 100644 --- a/examples/nxflat/tests/hello++/hello++3.cpp +++ b/examples/nxflat/tests/hello++/hello++3.cpp @@ -74,7 +74,7 @@ static CThingSayer MyThingSayer; CThingSayer::CThingSayer(void) { printf("CThingSayer::CThingSayer: I am!\n"); - szWhatToSay = NULL; + szWhatToSay = (const char*)NULL; } CThingSayer::~CThingSayer(void) @@ -85,7 +85,7 @@ CThingSayer::~CThingSayer(void) printf("CThingSayer::~CThingSayer: I will never say '%s' again\n", szWhatToSay); } - szWhatToSay = NULL; + szWhatToSay = (const char*)NULL; } void CThingSayer::Initialize(const char *czSayThis) diff --git a/examples/nxflat/tests/hello++/hello++4.cpp b/examples/nxflat/tests/hello++/hello++4.cpp index b6c0c488cb..60c8b2a45c 100644 --- a/examples/nxflat/tests/hello++/hello++4.cpp +++ b/examples/nxflat/tests/hello++/hello++4.cpp @@ -91,7 +91,7 @@ static CThingSayer MyThingSayer; CThingSayer::CThingSayer(void) { cout << "CThingSayer::CThingSayer: I am!" << endl; - szWhatToSay = (char*)NULL; + szWhatToSay = (const char*)NULL; } CThingSayer::~CThingSayer(void) @@ -102,7 +102,7 @@ CThingSayer::~CThingSayer(void) cout << "CThingSayer::~CThingSayer: I will never say '" << szWhatToSay << "' again" << endl; } - szWhatToSay = (char*)NULL; + szWhatToSay = (const char*)NULL; } void CThingSayer::Initialize(const char *czSayThis) diff --git a/examples/nxflat/tests/mutex/Makefile b/examples/nxflat/tests/mutex/Makefile index 6ba0b67361..314ed52244 100644 --- a/examples/nxflat/tests/mutex/Makefile +++ b/examples/nxflat/tests/mutex/Makefile @@ -47,7 +47,7 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $OBJS) +$(BIN): $(OBJS) $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) clean: diff --git a/examples/nxflat/tests/mutex/mutex.c b/examples/nxflat/tests/mutex/mutex.c index 5fdbdac5d4..dc42331ee6 100644 --- a/examples/nxflat/tests/mutex/mutex.c +++ b/examples/nxflat/tests/mutex/mutex.c @@ -38,6 +38,7 @@ ****************************************************************************/ #include +#include #include #include diff --git a/examples/nxflat/tests/pthread/Makefile b/examples/nxflat/tests/pthread/Makefile index eadba85abc..c1103d71ca 100644 --- a/examples/nxflat/tests/pthread/Makefile +++ b/examples/nxflat/tests/pthread/Makefile @@ -47,7 +47,7 @@ all: $(BIN) $(OBJS): %.o: %.c $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@ -$(BIN): $OBJS) +$(BIN): $(OBJS) $(NXFLATLD) $(NXFLATLDFLAGS) -o $@ $(OBJS) clean: diff --git a/examples/nxflat/tests/pthread/pthread.c b/examples/nxflat/tests/pthread/pthread.c index 89b489302c..a3977b3fc6 100644 --- a/examples/nxflat/tests/pthread/pthread.c +++ b/examples/nxflat/tests/pthread/pthread.c @@ -37,7 +37,9 @@ * Included Files ****************************************************************************/ +#include #include +#include #include /**************************************************************************** diff --git a/examples/nxflat/tests/signal/signal.c b/examples/nxflat/tests/signal/signal.c index 68d96702e6..52fc206d9b 100644 --- a/examples/nxflat/tests/signal/signal.c +++ b/examples/nxflat/tests/signal/signal.c @@ -37,11 +37,13 @@ * Included Files ****************************************************************************/ -#include /* For printf(), fprintf(), etc. */ -#include /* For signal(), sigaction(), etc. */ -#include /* For usleep() */ -#include /* For errno */ -#include /* (needed by getpid()) */ +#include +#include +#include +#include +#include +#include +#include /**************************************************************************** * Definitions diff --git a/examples/nxflat/tests/task/task.c b/examples/nxflat/tests/task/task.c index 28ec88d5f7..9694094092 100644 --- a/examples/nxflat/tests/task/task.c +++ b/examples/nxflat/tests/task/task.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,7 @@ * Private Data ****************************************************************************/ +static char child_name[] = "child"; static char child_arg[] = "Hello from your parent!"; static sem_t g_sem; @@ -56,7 +58,7 @@ static sem_t g_sem; * Privite Functions ****************************************************************************/ -int child_task(int argc, char **argv, char **envp) +int child_task(int argc, char **argv) { printf("Child: execv was successful!\n"); printf("Child: argc=%d\n", argc); @@ -70,9 +72,9 @@ int child_task(int argc, char **argv, char **envp) printf("Child: argv[0]=\"%s\"\n", argv[0]); - if (strcmp(argv[0], my_path) != 0) + if (strcmp(argv[0], child_name) != 0) { - printf("Child: expected argv[0] to be \"%s\"\n", my_path); + printf("Child: expected argv[0] to be \"%s\"\n", child_name); printf("Child: Exit-ting with status=3\n"); exit(3); } @@ -81,7 +83,7 @@ int child_task(int argc, char **argv, char **envp) if (strcmp(argv[1], child_arg) != 0) { - printf("Child: expected argv[1] to be \"%s\"\n", parent_arg); + printf("Child: expected argv[1] to be \"%s\"\n", child_arg); printf("Child: Exit-ting with status=4\n"); exit(4); } @@ -95,7 +97,7 @@ int child_task(int argc, char **argv, char **envp) * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { pid_t parent_pid = getpid(); char *child_argv[2]; @@ -109,7 +111,7 @@ int main(int argc, char **argv, char **envp) child_argv[0] = child_arg; child_argv[1] = 0; - ret = task_create("child", 50, 512, child_task, &child_arg); + ret = task_create(child_name, 50, 512, child_task, child_argv); if (ret != 0) { printf("Parent: task_create failed: %d\n", errno); diff --git a/libxx/libxx_delete.cxx b/libxx/libxx_delete.cxx index b1d72c6959..223a7bea90 100755 --- a/libxx/libxx_delete.cxx +++ b/libxx/libxx_delete.cxx @@ -38,6 +38,7 @@ //*************************************************************************** #include +#include //*************************************************************************** // Definitions diff --git a/libxx/libxx_deletea.cxx b/libxx/libxx_deletea.cxx index 34963b6f5e..3c519bd2ce 100755 --- a/libxx/libxx_deletea.cxx +++ b/libxx/libxx_deletea.cxx @@ -38,6 +38,7 @@ //*************************************************************************** #include +#include //*************************************************************************** // Definitions diff --git a/libxx/libxx_newa.cxx b/libxx/libxx_newa.cxx index 9bffb3c699..d0e5bd10b4 100755 --- a/libxx/libxx_newa.cxx +++ b/libxx/libxx_newa.cxx @@ -65,7 +65,7 @@ //*************************************************************************** //void *operator new[](size_t size) -void *operator new[]((unsigned long size) +void *operator new[](unsigned long nbytes) { // We have to allocate something