[rtems-graphics-toolkit commit] Added rtems_main. h include to ease migration to RTEMS

Gedare Bloom gedare at rtems.org
Tue Dec 24 15:24:07 UTC 2013


Module:    rtems-graphics-toolkit
Branch:    master
Commit:    855379ec7da853b6f8cecf3d0e6354a23b0a3fec
Changeset: http://git.rtems.org/rtems-graphics-toolkit/commit/?id=855379ec7da853b6f8cecf3d0e6354a23b0a3fec

Author:    Alexandru-Sever Horin <alex.sever.h at gmail.com>
Date:      Wed Aug  1 23:52:27 2012 +0300

Added rtems_main.h include to ease migration to RTEMS

---

 fltk-1.3.0/test/Makefile     |   12 ++++++------
 fltk-1.3.0/test/input.cxx    |    2 ++
 fltk-1.3.0/test/rtems_main.h |   11 +++++++++++
 3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/fltk-1.3.0/test/Makefile b/fltk-1.3.0/test/Makefile
index 04d4a93..a27459c 100644
--- a/fltk-1.3.0/test/Makefile
+++ b/fltk-1.3.0/test/Makefile
@@ -300,7 +300,7 @@ bitmap$(EXEEXT): bitmap.o
 boxtype$(EXEEXT): boxtype.o
 
 browser$(EXEEXT): browser.o
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ browser.o $(LINKFLTKFORMS) $(LDLIBS) 
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ browser.o $(LINKFLTKFORMS) $(LDLIBS)
 
 
 button$(EXEEXT): button.o
@@ -331,7 +331,7 @@ curve$(EXEEXT): curve.o
 
 demo$(EXEEXT): demo.o
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS) 
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS)
 
 device$(EXEEXT): device.o $(IMGLIBNAME)
 	echo Linking $@...
@@ -341,7 +341,7 @@ doublebuffer$(EXEEXT): doublebuffer.o
 
 editor$(EXEEXT): editor.o
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS) 
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
 
 fast_slow$(EXEEXT): fast_slow.o
 fast_slow.cxx:	fast_slow.fl ../fluid/fluid$(EXEEXT)
@@ -356,12 +356,12 @@ forms$(EXEEXT): forms.o
 	echo Linking $@...
 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ forms.o $(LINKFLTKFORMS) $(LDLIBS)
 
-hello$(EXEEXT): hello.o  
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINKFLTKFORMS) $(LDLIBS) 
+hello$(EXEEXT): hello.o
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ hello.o $(LINKFLTKFORMS) $(LDLIBS)
 
 help$(EXEEXT): help.o $(IMGLIBNAME)
 	echo Linking $@...
-	$(CXX) $(ARCHFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS) 
+	$(CXX) $(ARCHFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
 
 iconize$(EXEEXT): iconize.o
 
diff --git a/fltk-1.3.0/test/input.cxx b/fltk-1.3.0/test/input.cxx
index 762398d..ae8ea7c 100644
--- a/fltk-1.3.0/test/input.cxx
+++ b/fltk-1.3.0/test/input.cxx
@@ -25,6 +25,8 @@
 //     http://www.fltk.org/str.php
 //
 
+#include "rtems_main.h"
+
 #include <stdio.h>
 #include <FL/Fl.H>
 #include <FL/Fl_Window.H>
diff --git a/fltk-1.3.0/test/rtems_main.h b/fltk-1.3.0/test/rtems_main.h
new file mode 100644
index 0000000..c664660
--- /dev/null
+++ b/fltk-1.3.0/test/rtems_main.h
@@ -0,0 +1,11 @@
+#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




More information about the vc mailing list