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:
Xiang Xiao 2019-10-06 06:14:39 -06:00 committed by Gregory Nutt
parent ab7c5a7d4e
commit e806097c70
550 changed files with 664 additions and 2928 deletions

View file

@ -15,7 +15,6 @@ if EXAMPLES_ABNTCODI
config EXAMPLES_ABNTCODI_PROGNAME
string "Program name"
default "abntcodi"
depends on BUILD_LOADABLE
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

View file

@ -37,21 +37,14 @@ include $(TOPDIR)/Make.defs
# ABNTCODI built-in application info
CONFIG_EXAMPLES_ABNTCODI_PRIORITY ?= SCHED_PRIORITY_DEFAULT
CONFIG_EXAMPLES_ABNTCODI_STACKSIZE ?= 2048
APPNAME = abntcodi
PROGNAME = $(CONFIG_EXAMPLES_ABNTCODI_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_ABNTCODI_PRIORITY)
STACKSIZE = $(CONFIG_EXAMPLES_ABNTCODI_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_ABNTCODI)
# ABNTCODI Example
MAINSRC = abntcodi_main.c
CONFIG_EXAMPLES_ABNTCODI_PROGNAME ?= abntcodi$(EXEEXT)
PROGNAME = $(CONFIG_EXAMPLES_ABNTCODI_PROGNAME)
MODULE = CONFIG_EXAMPLES_ABNTCODI
include $(APPDIR)/Application.mk

View file

@ -82,11 +82,7 @@ void print_abnt_codi(FAR struct abnt_codi_proto_s *proto)
* abntcodi_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int abntcodi_main(int argc, char *argv[])
#endif
{
FAR struct abnt_codi_proto_s *proto;
int fd;