mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-06 08:46:31 +00:00
Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard.
This commit is contained in:
parent
ab7c5a7d4e
commit
e806097c70
550 changed files with 664 additions and 2928 deletions
|
|
@ -142,11 +142,6 @@ testing/smart_test
|
|||
|
||||
* CONFIG_TESTING_SMART_TEST=y
|
||||
|
||||
Dependencies:
|
||||
|
||||
* CONFIG_NSH_BUILTIN_APPS=y: This test can be built only as an NSH
|
||||
command
|
||||
|
||||
Source: NuttX
|
||||
Author: Ken Pettit
|
||||
Date: April 24, 2013
|
||||
|
|
|
|||
|
|
@ -39,15 +39,11 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
MAINSRC = cxxtest_main.cxx
|
||||
|
||||
CONFIG_XYZ_PROGNAME ?= cxxtest$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_XYZ_PROGNAME)
|
||||
|
||||
# cxxtest built-in application info
|
||||
|
||||
APPNAME = cxxtest
|
||||
PROGNAME = cxxtest
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
STACKSIZE = 4096
|
||||
|
||||
MODULE = CONFIG_TESTING_CXXTEST
|
||||
MODULE = $(CONFIG_TESTING_CXXTEST)
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ static void test_exception(void)
|
|||
|
||||
extern "C"
|
||||
{
|
||||
int cxxtest_main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// If C++ initialization for static constructors is supported, then do
|
||||
// that first
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ if TESTING_FSTEST
|
|||
config TESTING_FSTEST_PROGNAME
|
||||
string "Program name"
|
||||
default "fstest"
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the program that will be used when the NSH ELF
|
||||
program is installed.
|
||||
|
|
|
|||
|
|
@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# Generic file system stress test application info
|
||||
|
||||
CONFIG_TESTING_FSTEST_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_TESTING_FSTEST_STACKSIZE ?= 2048
|
||||
|
||||
APPNAME = fstest
|
||||
PROGNAME = $(CONFIG_TESTING_FSTEST_PROGNAME)
|
||||
PRIORITY = $(CONFIG_TESTING_FSTEST_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_TESTING_FSTEST_STACKSIZE)
|
||||
MODULE = $(CONFIG_TESTING_FSTEST)
|
||||
|
||||
# Generic file system stress test
|
||||
|
||||
MAINSRC = fstest_main.c
|
||||
|
||||
CONFIG_TESTING_FSTEST_PROGNAME ?= hello$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_TESTING_FSTEST_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_FSTEST
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -951,11 +951,7 @@ static int fstest_directory(void)
|
|||
* Name: fstest_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int fstest_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
struct statfs buf;
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -37,13 +37,11 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# NXFFS file system example
|
||||
|
||||
APPNAME = nxffs
|
||||
PROGNAME = nxffs
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
STACKSIZE = 2048
|
||||
MODULE = $(CONFIG_TESTING_NXFFS)
|
||||
|
||||
MAINSRC = nxffs_main.c
|
||||
|
||||
CONFIG_XYZ_PROGNAME ?= nxffs$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_XYZ_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_NXFFS
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -783,11 +783,7 @@ static int nxffs_directory(void)
|
|||
* Name: nxffs_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int nxffs_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,10 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# ostest built-in application info
|
||||
|
||||
APPNAME = ostest
|
||||
PROGNAME = ostest
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
STACKSIZE = 2048
|
||||
MODULE = $(CONFIG_TESTING_OSTEST)
|
||||
|
||||
# NuttX OS Test
|
||||
|
||||
|
|
@ -133,9 +134,4 @@ CSRCS += prioinherit.c
|
|||
endif # CONFIG_PRIORITY_INHERITANCE
|
||||
endif # CONFIG_DISABLE_PTHREAD
|
||||
|
||||
CONFIG_XYZ_PROGNAME ?= ostest$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_XYZ_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_OSTEST
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -592,11 +592,7 @@ static void stdio_test(void)
|
|||
* ostest_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char **argv)
|
||||
#else
|
||||
int ostest_main(int argc, FAR char *argv[])
|
||||
#endif
|
||||
{
|
||||
int result;
|
||||
#ifdef CONFIG_TESTING_OSTEST_WAITRESULT
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ if TESTING_SCANFTEST
|
|||
config TESTING_SCANFTEST_PROGNAME
|
||||
string "Program name"
|
||||
default "scanftest"
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the program that will be used when the NSH ELF
|
||||
program is installed.
|
||||
|
|
|
|||
|
|
@ -37,21 +37,13 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# scanf() test built-in application info
|
||||
|
||||
CONFIG_TESTING_SCANFTEST_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_TESTING_SCANFTEST_STACKSIZE ?= 2048
|
||||
|
||||
APPNAME = scanftest
|
||||
|
||||
PROGNAME = $(CONFIG_TESTING_SCANFTEST_PROGNAME)
|
||||
PRIORITY = $(CONFIG_TESTING_SCANFTEST_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_TESTING_SCANFTEST_STACKSIZE)
|
||||
MODULE = $(CONFIG_TESTING_SCANFTEST)
|
||||
|
||||
# scanf test files
|
||||
|
||||
MAINSRC = scanftest_main.c
|
||||
|
||||
CONFIG_TESTING_SCANFTEST_PROGNAME ?= scanftest$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_TESTING_SCANFTEST_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_SCANFTEST
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -1060,11 +1060,7 @@ type_data[] =
|
|||
* scanftest_main
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BUILD_MODULE)
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int scanftest_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int t;
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -37,13 +37,11 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# SMART file system stress test
|
||||
|
||||
APPNAME = smart
|
||||
PROGNAME = smart
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
STACKSIZE = 2048
|
||||
MODULE = $(CONFIG_TESTING_SMART)
|
||||
|
||||
MAINSRC = smart_main.c
|
||||
|
||||
CONFIG_XYZ_PROGNAME ?= smart$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_XYZ_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_SMART
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -791,11 +791,7 @@ static int smart_directory(void)
|
|||
* Name: smart_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int smart_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
config TESTING_SMART_TEST
|
||||
tristate "SMART filesystem test tool"
|
||||
default n
|
||||
depends on NSH_BUILTIN_APPS
|
||||
---help---
|
||||
Performs a file-based test on a SMART (or any) filesystem. Validates
|
||||
seek, append and seek-with-write operations. This test can be built
|
||||
|
|
|
|||
|
|
@ -42,15 +42,11 @@ endif
|
|||
|
||||
# SMART filesystem test tool
|
||||
|
||||
APPNAME = smart_test
|
||||
PROGNAME = smart_test
|
||||
PRIORITY = SCHED_PRIORITY_DEFAULT
|
||||
STACKSIZE = 4096
|
||||
MODULE = $(CONFIG_TESTING_SMART_TEST)
|
||||
|
||||
MAINSRC = smart_test.c
|
||||
|
||||
CONFIG_XYZ_PROGNAME ?= smart_test$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_XYZ_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_SMART_TEST
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -6,11 +6,6 @@ README
|
|||
|
||||
* CONFIG_TESTING_SMART_TEST=y
|
||||
|
||||
Dependencies:
|
||||
|
||||
* CONFIG_NSH_BUILTIN_APPS=y: This test can be built only as an NSH
|
||||
command
|
||||
|
||||
Source: NuttX
|
||||
Author: Ken Pettit
|
||||
Date: April 24, 2013
|
||||
|
|
|
|||
|
|
@ -586,11 +586,7 @@ static void smart_usage(void)
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int smart_test_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int ret, opt;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ config TESTING_SMP_NBARRIER_THREADS
|
|||
config TESTING_SMP_PROGNAME
|
||||
string "Program name"
|
||||
default "smp"
|
||||
depends on BUILD_LOADABLE
|
||||
---help---
|
||||
This is the name of the program that will be used when the NSH ELF
|
||||
program is installed.
|
||||
|
|
|
|||
|
|
@ -37,20 +37,13 @@ include $(TOPDIR)/Make.defs
|
|||
|
||||
# SMP built-in application info
|
||||
|
||||
CONFIG_TESTING_SMP_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||
CONFIG_TESTING_SMP_STACKSIZE ?= 2048
|
||||
|
||||
APPNAME = smp
|
||||
PROGNAME = $(CONFIG_TESTING_SMP_PROGNAME)
|
||||
PRIORITY = $(CONFIG_TESTING_SMP_PRIORITY)
|
||||
STACKSIZE = $(CONFIG_TESTING_SMP_STACKSIZE)
|
||||
MODULE = $(CONFIG_TESTING_SMP)
|
||||
|
||||
# SMP Example
|
||||
|
||||
MAINSRC = smp_main.c
|
||||
|
||||
CONFIG_TESTING_SMP_PROGNAME ?= smp$(EXEEXT)
|
||||
PROGNAME = $(CONFIG_TESTING_SMP_PROGNAME)
|
||||
|
||||
MODULE = CONFIG_TESTING_SMP
|
||||
|
||||
include $(APPDIR)/Application.mk
|
||||
|
|
|
|||
|
|
@ -217,11 +217,7 @@ static pthread_addr_t barrier_thread(pthread_addr_t parameter)
|
|||
* smp_main
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BUILD_MODULE
|
||||
int main(int argc, FAR char *argv[])
|
||||
#else
|
||||
int smp_main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
pthread_t threadid[CONFIG_TESTING_SMP_NBARRIER_THREADS];
|
||||
pthread_addr_t result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue