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

@ -4,7 +4,7 @@
#
menuconfig WIRELESS_WAPI
tristate "IEEE 802.11 Configuration Library"
bool "IEEE 802.11 Configuration Library"
default n
depends on NET && DRIVERS_WIRELESS
---help---
@ -14,7 +14,7 @@ menuconfig WIRELESS_WAPI
if WIRELESS_WAPI
config WIRELESS_WAPI_CMDTOOL
bool "IEEE 802.11 Command Line Tool"
tristate "IEEE 802.11 Command Line Tool"
default n
---help---
By default, Wapi is build as only a library. If this option is
@ -24,7 +24,6 @@ config WIRELESS_WAPI_CMDTOOL
config WIRELESS_WAPI_PROGNAME
string "Program Name"
default "wapi"
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

@ -33,27 +33,17 @@
#
############################################################################
# TODO, this makefile should run make under the app dirs, instead of
# sourcing the Make.defs!
include $(TOPDIR)/Make.defs
# IEEE802.11 Wapi Application
CONFIG_WIRELESS_WAPI_PRIORITY ?= 100
CONFIG_WIRELESS_WAPI_STACKSIZE ?= 2048
include $(APPDIR)/wireless/wapi/src/Make.defs
ifneq ($(MAINSRC),)
APPNAME = wapi
ifneq ($(CONFIG_WIRELESS_WAPI_CMDTOOL),)
PROGNAME = $(CONFIG_WIRELESS_WAPI_PROGNAME)
PRIORITY = $(CONFIG_WIRELESS_WAPI_PRIORITY)
STACKSIZE = $(CONFIG_WIRELESS_WAPI_STACKSIZE)
CONFIG_WAPI_PROGNAME ?= wapi$(EXEEXT)
PROGNAME = $(CONFIG_WAPI_PROGNAME)
MODULE = $(CONFIG_WIRELESS_WAPI_CMDTOOL)
endif
MODULE = CONFIG_WIRELESS_WAPI
include $(APPDIR)/Application.mk

View file

@ -37,7 +37,7 @@ ifneq ($(CONFIG_WIRELESS_WAPI),)
CSRCS = network.c util.c wireless.c driver_wext.c
ifeq ($(CONFIG_WIRELESS_WAPI_CMDTOOL),y)
ifneq ($(CONFIG_WIRELESS_WAPI_CMDTOOL),)
MAINSRC = wapi.c
endif

View file

@ -765,11 +765,7 @@ static void wapi_showusage(FAR const char *progname, int exitcode)
* Public Functions
****************************************************************************/
#ifdef BUILD_MODULE
int main(int argc, FAR char *argv[])
#else
int wapi_main(int argc, char *argv[])
#endif
{
FAR const char *cmdname;
FAR const struct wapi_command_s *wapicmd;