From c1403ef1539f60b323f57a0e344734111b4c18cf Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 11 Aug 1995 14:30:27 +0000 Subject: Added flush of output on exit. On some UNIX's using the native library resulted in no output when the output was redirected until this was done. Redirection is important because runtest redirects test output. Added support for numerous environment variables which make it easier to run a multi-node system using a single executable and to tailor the size of the workspace and heap. --- c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc') diff --git a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc index 4c55f3798f..3831f9456f 100644 --- a/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc +++ b/c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc @@ -1,12 +1,12 @@ // @(#)rtems-ctor.cc 1.6 - 95/04/25 -// +// // /* * rtems-ctor.cc * * Description: - * This file exists solely to (try to) ensure RTEMS is initialized + * This file exists solely to (try to) ensure RTEMS is initialized * before any global constructors are run. * * The problem: @@ -49,6 +49,8 @@ */ #include +#include +#include /* * RTEMS program name @@ -61,7 +63,7 @@ char *rtems_progname; class RTEMS { public: - RTEMS(); + RTEMS(); ~RTEMS(); }; @@ -83,9 +85,9 @@ extern "C" { char **argv, char **environp) { - rtems_argc = argc; - rtems_argv = argv; - rtems_envp = environp; + rtems_argc = argc; + rtems_argv = argv; + rtems_envp = environp; if ((argc > 0) && argv && argv[0]) rtems_progname = argv[0]; @@ -103,6 +105,8 @@ extern "C" { * This allows our destructors to get run normally */ + fflush( stdout ); + fflush( stderr ); return 0; } } -- cgit v1.2.3