Index: fltk-1.3.0/rtems_main.cxx
===================================================================
--- fltk-1.3.0/rtems_main.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
+++ fltk-1.3.0/rtems_main.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -0,0 +1,25 @@
+//#ifndef RTEMS_MAIN_H
+//#define RTEMS_MAIN_H
+
+//transform call to main to call to rtems_main
+//#define main(x,y) rtems_main(x,y)
+//#define main(x)   rtems_main(x)
+//#define main()    rtems_main()
+
+//extern "C" int rtems_main(int argc, char **argv)
+//{
+//  main(argc, argv);
+//}
+//
+//
+//#endif
+//extern "C" 
+extern int main(int argc, char **argv);
+
+
+extern "C" int rtems_main(int argc, char **argv)
+{
+  using namespace std;
+  return main(argc, argv);
+}
+
Index: fltk-1.3.0/test/Makefile
===================================================================
--- fltk-1.3.0/test/Makefile	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/Makefile	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -32,5 +32,5 @@
 include $(PROJECT_ROOT)/make/leaf.cfg
 
-LDLIBS+= ../../microwin/src/obj/rtems_init.o ../../microwin/src/obj/FilesystemImage.o 
+LDLIBS+= ../../microwin/src/obj/rtems_init.o ../../microwin/src/obj/FilesystemImage.o ../rtems_main.cxx 
 
 CPPFILES =\
Index: fltk-1.3.0/test/blocks.cxx
===================================================================
--- fltk-1.3.0/test/blocks.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/blocks.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -495,5 +495,5 @@
 
 
-extern "C" int rtems_main(int argc, char *argv[]) {
+int main(int argc, char *argv[]) {
   Fl::scheme("plastic");
   Fl::visible_focus(0);
Index: fltk-1.3.0/test/browser.cxx
===================================================================
--- fltk-1.3.0/test/browser.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/browser.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -123,5 +123,5 @@
 }
 
-extern "C" int rtems_main(int argc, char **argv) {
+int main(int argc, char **argv) {
   int i;
   if (!Fl::args(argc,argv,i)) Fl::fatal(Fl::help);
Index: fltk-1.3.0/test/demo.cxx
===================================================================
--- fltk-1.3.0/test/demo.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/demo.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -396,5 +396,5 @@
 }
 
-extern "C" int rtems_main(int argc, char **argv) {
+int main(int argc, char **argv) {
   putenv((char *)"FLTK_DOCDIR=../documentation/html");
   char buf[FL_PATH_MAX];
Index: fltk-1.3.0/test/hello.cxx
===================================================================
--- fltk-1.3.0/test/hello.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/hello.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -30,5 +30,5 @@
 #include <FL/Fl_Box.H>
 
-extern "C" int rtems_main(int argc, char **argv) {
+int main(int argc, char **argv) {
   Fl_Window *window = new Fl_Window(340,180);
   Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
Index: fltk-1.3.0/test/help.cxx
===================================================================
--- fltk-1.3.0/test/help.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/help.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -61,5 +61,5 @@
 
 				// O - Exit status
-extern "C" int rtems_main(int  argc,			// I - Number of command-line arguments
+int main(int  argc,			// I - Number of command-line arguments
      char *argv[])		// I - Command-line arguments
 {
Index: fltk-1.3.0/test/input.cxx
===================================================================
--- fltk-1.3.0/test/input.cxx	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ fltk-1.3.0/test/input.cxx	(revision a2d9dfc7af9bf59117cbeaff030756c8ea5dc9e0)
@@ -25,6 +25,4 @@
 //     http://www.fltk.org/str.php
 //
-
-#include "rtems_main.h"
 
 #include <stdio.h>
Index: tk-1.3.0/test/rtems_main.h
===================================================================
--- fltk-1.3.0/test/rtems_main.h	(revision ea5988bce6f16ea56292f2d8a982abf1f8ce135e)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#ifndef RTEMS_MAIN_H
-#define RTEMS_MAIN_H
-
-//transform call to main to call to rtems_main
-#define main(x,y) rtems_main(x,y)
-//#define main(x)   rtems_main(x)
-//#define main()    rtems_main()
-
-extern "C" int rtems_main(int argc, char **argv);
-
-#endif
