You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/12 06:15:03 UTC

[incubator-nuttx] branch master updated (b72be1ddbf -> 3b78f6db3e)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


    from b72be1ddbf epoll: Call poll_notify before unlock mutex
     new d0c7d2dd88 tools: fix arguments passing in configure.bat
     new eeeb88a1ed tools: fix NULL pointer dereference in configure.c
     new 3b78f6db3e tools: Do not check ccname get_os() for windows native build

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tools/configure.bat | 18 ++++++++++++++++--
 tools/configure.c   |  4 ++--
 tools/incdir.c      | 18 ++++++------------
 3 files changed, 24 insertions(+), 16 deletions(-)


[incubator-nuttx] 02/03: tools: fix NULL pointer dereference in configure.c

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit eeeb88a1ed00eb8c5ba05383fc3dac778c81567a
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sat Nov 12 01:25:41 2022 +0200

    tools: fix NULL pointer dereference in configure.c
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 tools/configure.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/configure.c b/tools/configure.c
index aa6d523164..ccdb096eae 100644
--- a/tools/configure.c
+++ b/tools/configure.c
@@ -800,7 +800,7 @@ static void enumerate_configs(void)
 
 static void check_configdir(void)
 {
-  if (verify_optiondir(g_configpath))
+  if (g_configpath && verify_optiondir(g_configpath))
     {
       /* Get the path to the custom board scripts directory */
 
@@ -849,7 +849,7 @@ static void check_configdir(void)
       snprintf(g_buffer, BUFFER_SIZE, "%s%cboards%c%s%c%s%c%s%cscripts",
                g_topdir, g_delim, g_delim, g_archdir, g_delim,
                g_chipdir, g_delim, g_boarddir, g_delim);
-      debug("check_configdir: Checking scriptspath=%s\n", g_buffer);
+      debug("check_configdir: Checking scripts path=%s\n", g_buffer);
 
       g_scriptspath = NULL;
       if (verify_optiondir(g_buffer))


[incubator-nuttx] 03/03: tools: Do not check ccname get_os() for windows native build

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 3b78f6db3eae206ab7f7365e076481297ce9b525
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sat Nov 12 01:29:25 2022 +0200

    tools: Do not check ccname get_os() for windows native build
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 tools/incdir.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/tools/incdir.c b/tools/incdir.c
index c5d6afa207..bc8834319e 100644
--- a/tools/incdir.c
+++ b/tools/incdir.c
@@ -115,15 +115,10 @@ static void show_help(const char *progname, int exitcode)
   exit(exitcode);
 }
 
-static enum os_e get_os(char *ccname)
+static enum os_e get_os(void)
 {
 #ifdef CONFIG_WINDOWS_NATIVE
-  /* Check for MinGW which implies a Windows native environment */
-
-  if (strstr(ccname, "mingw") != NULL)
-    {
-      return OS_WINDOWS;
-    }
+  return OS_WINDOWS;
 #else
   struct utsname buf;
   int ret;
@@ -168,13 +163,12 @@ static enum os_e get_os(char *ccname)
     {
       fprintf(stderr, "ERROR:  Unknown operating system: %s\n",
               buf.sysname);
+      return OS_UNKNOWN;
     }
-
 #endif
-  return OS_UNKNOWN;
 }
 
-static enum compiler_e get_compiler(char *ccname, enum os_e os)
+static enum compiler_e get_compiler(char *ccname)
 {
   /* Let's assume that all GCC compiler paths contain the string gcc or
    * g++ and no non-GCC compiler paths include these substrings.
@@ -330,14 +324,14 @@ int main(int argc, char **argv, char **envp)
    * files.
    */
 
-  os = get_os(ccname);
+  os = get_os();
   if (os == OS_UNKNOWN)
     {
       fprintf(stderr, "ERROR:  Operating system not recognized\n");
       show_advice(progname, EXIT_FAILURE);
     }
 
-  compiler = get_compiler(ccname, os);
+  compiler = get_compiler(ccname);
   if (compiler == COMPILER_UNKNOWN)
     {
       fprintf(stderr, "ERROR:  Compiler not recognized.\n");


[incubator-nuttx] 01/03: tools: fix arguments passing in configure.bat

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d0c7d2dd8848bf5a0b382f42f9f881815793c712
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Sat Nov 12 01:24:02 2022 +0200

    tools: fix arguments passing in configure.bat
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 tools/configure.bat | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/tools/configure.bat b/tools/configure.bat
index 5f7336c7f8..66c4f06484 100755
--- a/tools/configure.bat
+++ b/tools/configure.bat
@@ -33,6 +33,8 @@ set tooldir=%CD%
 rem Parse command line arguments
 
 set debug=
+set enforce_distclean=
+set distclean=
 set fmt=-b
 set posix=
 set help=
@@ -44,11 +46,15 @@ set hostopt=
 if "%1"=="" goto :NoConfig
 if "%1"=="-h" goto :ShowUsage
 if "%1"=="-d" goto :SetDebug
+if "%1"=="-E" goto :SetEnforceDistclean
+if "%1"=="-e" goto :SetDistclean
 if "%1"=="-f" goto :SetFormat
 if "%1"=="-b" goto :SetFormat
 if "%1"=="-l" goto :SetHostOption
+if "%1"=="-m" goto :SetHostOption
 if "%1"=="-c" goto :SetHostOption
 if "%1"=="-n" goto :SetHostOption
+if "%1"=="-B" goto :SetHostOption
 if "%1"=="-L" goto :SetList
 if "%1"=="-a" goto :SetAppDir
 
@@ -59,6 +65,14 @@ goto EndOfLoop
 set debug=%1
 goto :NextArg
 
+:SetEnforceDistclean
+set enforce_distclean=%1
+goto :NextArg
+
+:SetDistclean
+set distclean=%1
+goto :NextArg
+
 :SetFormat
 set fmt=%1
 goto :NextArg
@@ -91,13 +105,13 @@ echo %cc% %cflags% -o configure.exe configure.c cfgparser.c
 %cc% %cflags% -o configure.exe configure.c cfgparser.c
 if errorlevel 1 (
   echo ERROR: %cc% failed
-  echo Is ming32-gcc.exe installed?  Is it in the PATH variable?
+  echo Is mingw32-gcc.exe installed?  Is it in the PATH variable?
   goto End
 )
 
 :HaveConfigureExe
 cd ..
-tools\configure.exe %debug% %fmt% %hostopt% %appdir% %config% %list%
+tools\configure.exe %debug% %enforce_distclean% %distclean% %fmt% %hostopt% %appdir% %config% %list%
 if errorlevel 1 echo configure.exe failed
 goto End