[Xenomai-git] Philippe Gerum : boilerplate: drop __real_main() wrapper

2017-02-08 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b

Author: Philippe Gerum 
Date:   Wed Nov  9 11:25:30 2016 +0100

boilerplate: drop __real_main() wrapper

Such kind of wrappers is supposed to help when --wrap is not given at
link time, in resolving direct references to the real symbols such as
those which may be done from the __wrap routines.

This said, __real_main() is special, in that there is no reason to
call such routine explicitly if --wrap is not given, by
definition. Only the bootstrap module (init/bootstrap.c) may call the
real main() entry point this way, and such module is glued to the
executable only if --wrap is passed to the linker.

Therefore we may drop this particular wrapper and the file which only
contains it altogether.

---

 lib/boilerplate/Makefile.am |3 +--
 lib/boilerplate/wrappers.c  |   27 ---
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/lib/boilerplate/Makefile.am b/lib/boilerplate/Makefile.am
index 4176c6d..9b8612d 100644
--- a/lib/boilerplate/Makefile.am
+++ b/lib/boilerplate/Makefile.am
@@ -8,8 +8,7 @@ libboilerplate_la_SOURCES = \
hash.c  \
obstack.c   \
setup.c \
-   time.c  \
-   wrappers.c
+   time.c
 
 if XENO_DEBUG
 libboilerplate_la_SOURCES += debug.c
diff --git a/lib/boilerplate/wrappers.c b/lib/boilerplate/wrappers.c
deleted file mode 100644
index 9d2490c..000
--- a/lib/boilerplate/wrappers.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2013 Philippe Gerum .
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-#include 
-
-int main(int argc, char *const argv[]);
-
-int __real_main(int argc, char *const argv[]);
-
-__weak int __real_main(int argc, char *const argv[])
-{
-   return main(argc, argv);
-}


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : boilerplate: drop __real_main() wrapper

2016-11-21 Thread git repository hosting
Module: xenomai-3
Branch: wip/drivers
Commit: bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b

Author: Philippe Gerum 
Date:   Wed Nov  9 11:25:30 2016 +0100

boilerplate: drop __real_main() wrapper

Such kind of wrappers is supposed to help when --wrap is not given at
link time, in resolving direct references to the real symbols such as
those which may be done from the __wrap routines.

This said, __real_main() is special, in that there is no reason to
call such routine explicitly if --wrap is not given, by
definition. Only the bootstrap module (init/bootstrap.c) may call the
real main() entry point this way, and such module is glued to the
executable only if --wrap is passed to the linker.

Therefore we may drop this particular wrapper and the file which only
contains it altogether.

---

 lib/boilerplate/Makefile.am |3 +--
 lib/boilerplate/wrappers.c  |   27 ---
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/lib/boilerplate/Makefile.am b/lib/boilerplate/Makefile.am
index 4176c6d..9b8612d 100644
--- a/lib/boilerplate/Makefile.am
+++ b/lib/boilerplate/Makefile.am
@@ -8,8 +8,7 @@ libboilerplate_la_SOURCES = \
hash.c  \
obstack.c   \
setup.c \
-   time.c  \
-   wrappers.c
+   time.c
 
 if XENO_DEBUG
 libboilerplate_la_SOURCES += debug.c
diff --git a/lib/boilerplate/wrappers.c b/lib/boilerplate/wrappers.c
deleted file mode 100644
index 9d2490c..000
--- a/lib/boilerplate/wrappers.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2013 Philippe Gerum .
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-#include 
-
-int main(int argc, char *const argv[]);
-
-int __real_main(int argc, char *const argv[]);
-
-__weak int __real_main(int argc, char *const argv[])
-{
-   return main(argc, argv);
-}


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : boilerplate: drop __real_main() wrapper

2016-11-15 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b

Author: Philippe Gerum 
Date:   Wed Nov  9 11:25:30 2016 +0100

boilerplate: drop __real_main() wrapper

Such kind of wrappers is supposed to help when --wrap is not given at
link time, in resolving direct references to the real symbols such as
those which may be done from the __wrap routines.

This said, __real_main() is special, in that there is no reason to
call such routine explicitly if --wrap is not given, by
definition. Only the bootstrap module (init/bootstrap.c) may call the
real main() entry point this way, and such module is glued to the
executable only if --wrap is passed to the linker.

Therefore we may drop this particular wrapper and the file which only
contains it altogether.

---

 lib/boilerplate/Makefile.am |3 +--
 lib/boilerplate/wrappers.c  |   27 ---
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/lib/boilerplate/Makefile.am b/lib/boilerplate/Makefile.am
index 4176c6d..9b8612d 100644
--- a/lib/boilerplate/Makefile.am
+++ b/lib/boilerplate/Makefile.am
@@ -8,8 +8,7 @@ libboilerplate_la_SOURCES = \
hash.c  \
obstack.c   \
setup.c \
-   time.c  \
-   wrappers.c
+   time.c
 
 if XENO_DEBUG
 libboilerplate_la_SOURCES += debug.c
diff --git a/lib/boilerplate/wrappers.c b/lib/boilerplate/wrappers.c
deleted file mode 100644
index 9d2490c..000
--- a/lib/boilerplate/wrappers.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2013 Philippe Gerum .
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-#include 
-
-int main(int argc, char *const argv[]);
-
-int __real_main(int argc, char *const argv[]);
-
-__weak int __real_main(int argc, char *const argv[])
-{
-   return main(argc, argv);
-}


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : boilerplate: drop __real_main() wrapper

2016-11-09 Thread git repository hosting
Module: xenomai-3
Branch: stable-3.0.x
Commit: bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=bc8afd4291cbf1ececf868f4e57feb5cf3f73a0b

Author: Philippe Gerum 
Date:   Wed Nov  9 11:25:30 2016 +0100

boilerplate: drop __real_main() wrapper

Such kind of wrappers is supposed to help when --wrap is not given at
link time, in resolving direct references to the real symbols such as
those which may be done from the __wrap routines.

This said, __real_main() is special, in that there is no reason to
call such routine explicitly if --wrap is not given, by
definition. Only the bootstrap module (init/bootstrap.c) may call the
real main() entry point this way, and such module is glued to the
executable only if --wrap is passed to the linker.

Therefore we may drop this particular wrapper and the file which only
contains it altogether.

---

 lib/boilerplate/Makefile.am |3 +--
 lib/boilerplate/wrappers.c  |   27 ---
 2 files changed, 1 insertion(+), 29 deletions(-)

diff --git a/lib/boilerplate/Makefile.am b/lib/boilerplate/Makefile.am
index 4176c6d..9b8612d 100644
--- a/lib/boilerplate/Makefile.am
+++ b/lib/boilerplate/Makefile.am
@@ -8,8 +8,7 @@ libboilerplate_la_SOURCES = \
hash.c  \
obstack.c   \
setup.c \
-   time.c  \
-   wrappers.c
+   time.c
 
 if XENO_DEBUG
 libboilerplate_la_SOURCES += debug.c
diff --git a/lib/boilerplate/wrappers.c b/lib/boilerplate/wrappers.c
deleted file mode 100644
index 9d2490c..000
--- a/lib/boilerplate/wrappers.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2013 Philippe Gerum .
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-#include 
-
-int main(int argc, char *const argv[]);
-
-int __real_main(int argc, char *const argv[]);
-
-__weak int __real_main(int argc, char *const argv[])
-{
-   return main(argc, argv);
-}


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git