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

@ -46,8 +46,10 @@ else
CONTENT_MAKE += -f Makefile.nxflat
endif
CONFIG_XYZ_PROGNAME ?= thttpd$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
PROGNAME = thttp
PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 2048
MODULE = $(CONFIG_EXAMPLES_THTTPD)
# Common build
@ -63,6 +65,4 @@ depend::
clean::
@$(CONTENT_MAKE) clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV)
MODULE = CONFIG_EXAMPLES_THTTPD
include $(APPDIR)/Application.mk

View file

@ -35,10 +35,7 @@
include $(TOPDIR)/Make.defs
CONFIG_THTTPD_CGI_PRIORITY ?= 100
CONFIG_THTTPD_CGI_STACKSIZE ?= 2048
APPNAME = hello tasks
PROGNAME = hello tasks
PRIORITY = $(CONFIG_THTTPD_CGI_PRIORITY)
STACKSIZE = $(CONFIG_THTTPD_CGI_STACKSIZE)
@ -50,8 +47,6 @@ ROMFS_HDR = $(CONTENT_DIR)/romfs.h
CSRCS = hello.c tasks.c
PROGNAME = hello$(EXEEXT) tasks$(EXEEXT)
ROOTDEPPATH += --dep-path hello --dep-path tasks
VPATH += :hello:tasks
@ -87,6 +82,4 @@ clean::
$(call DELFILE, $(ROMFS_IMG))
@rm -rf $(ROMFS_DIR)
MODULE = CONFIG_EXAMPLES_THTTPD
include $(APPDIR)/Application.mk

View file

@ -190,11 +190,7 @@ int g_thttpdnsymbols;
* thttp_main
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int thttp_main(int argc, char *argv[])
#endif
{
struct in_addr addr;
#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC