mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 12:55:43 +08:00
Straighten out issues about who calls C++ initializers with CXXTEST or HELLOXX are built as NSH applications; Add an ofstream test to CXXTEST suggested by Michael; Update many defconfig fiels to that they set configurations to handle C++ constructors just as before these configuration changes
This commit is contained in:
@@ -46,11 +46,13 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#if defined(CONFIG_FS_BINFS) && (CONFIG_BUILTIN)
|
||||
#include <nuttx/binfmt/builtin.h>
|
||||
# include <nuttx/binfmt/builtin.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_EXECFUNCS_SYMTAB)
|
||||
#include <nuttx/binfmt/symtab.h>
|
||||
# include <nuttx/binfmt/symtab.h>
|
||||
#endif
|
||||
|
||||
#include <apps/nsh.h>
|
||||
@@ -59,6 +61,12 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* C++ initialization requires CXX initializer support */
|
||||
|
||||
#if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
# undef CONFIG_EXAMPLES_NSH_CXXINITIALIZE
|
||||
#endif
|
||||
|
||||
/* The NSH telnet console requires networking support (and TCP/IP) */
|
||||
|
||||
#ifndef CONFIG_NET
|
||||
@@ -115,11 +123,11 @@ int nsh_main(int argc, char *argv[])
|
||||
|
||||
/* Call all C++ static constructors */
|
||||
|
||||
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
|
||||
#if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
|
||||
up_cxxinitialize();
|
||||
#endif
|
||||
|
||||
/* Make sure that we are using our symbol take */
|
||||
/* Make sure that we are using our symbol table */
|
||||
|
||||
#if defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_EXECFUNCS_SYMTAB)
|
||||
exec_setsymtab(CONFIG_EXECFUNCS_SYMTAB, 0);
|
||||
|
Reference in New Issue
Block a user