From 7755d921a8a04fdd7a335bcc45d78747ead15f2b Mon Sep 17 00:00:00 2001
From: Gregory Nutt
Date: Fri, 27 Jun 2014 08:14:07 -0600
Subject: Various changes associated with symbol tables. Most from Pelle
Windestam
---
nuttx/Documentation/NuttXNxFlat.html | 7 +-
nuttx/configs/README.txt | 2 +-
nuttx/include/cxx/cunistd | 2 +-
nuttx/include/inttypes.h | 15 +--
nuttx/include/nuttx/math.h | 8 ++
nuttx/include/unistd.h | 4 +-
nuttx/libc/README.txt | 2 +-
nuttx/libc/fixedmath/Make.defs | 2 +-
nuttx/libc/fixedmath/lib_rint.c | 135 ---------------------------
nuttx/libc/lib.csv | 171 -----------------------------------
nuttx/libc/libc.csv | 170 ++++++++++++++++++++++++++++++++++
nuttx/libc/math.csv | 73 +++++++++++++++
nuttx/libc/math/Make.defs | 2 +-
nuttx/libc/math/lib_rint.c | 137 ++++++++++++++++++++++++++++
nuttx/tools/README.txt | 2 +-
nuttx/tools/mksymtab.c | 1 +
16 files changed, 410 insertions(+), 323 deletions(-)
delete mode 100644 nuttx/libc/fixedmath/lib_rint.c
delete mode 100644 nuttx/libc/lib.csv
create mode 100644 nuttx/libc/libc.csv
create mode 100644 nuttx/libc/math.csv
create mode 100644 nuttx/libc/math/lib_rint.c
(limited to 'nuttx')
diff --git a/nuttx/Documentation/NuttXNxFlat.html b/nuttx/Documentation/NuttXNxFlat.html
index 41b2a19ee..89b415041 100644
--- a/nuttx/Documentation/NuttXNxFlat.html
+++ b/nuttx/Documentation/NuttXNxFlat.html
@@ -407,7 +407,10 @@ any following arguments.
nuttx/syscall/syscall.csv
that describes the NuttX RTOS interface, and
- nuttx/libc/lib.csv
that describes the NuttX C library interface.
+ nuttx/libc/libc.csv
that describes the NuttX C library interface.
+
+
+ nuttx/libc/math.cvs
that descirbes any math library.
@@ -424,7 +427,7 @@ Where:
cd nuttx/tools
-cat ../syscall/syscall.csv ../libc/lib.csv | sort >tmp.csv
+cat ../syscall/syscall.csv ../libc/libc.csv | sort >tmp.csv
./mksymtab.exe tmp.csv tmp.c
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index ff1ef80a7..8ed0060aa 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -684,7 +684,7 @@ There are also common-separated value (CSV) values in the source try that
provide information about symbols. In particular:
nuttx/syscall/syscall.csv - Describes the NuttX RTOS interface, and
- nuttx/lib/lib.csv - Describes the NuttX C library interface.
+ nuttx/lib/libc.csv - Describes the NuttX C library interface.
There is a tool at nuttx/tools/mksymtab that will use these CSV files as
input to generate a generic symbol table. See nuttx/tools/README.txt for
diff --git a/nuttx/include/cxx/cunistd b/nuttx/include/cxx/cunistd
index 2f0b71270..1a9c2cf16 100644
--- a/nuttx/include/cxx/cunistd
+++ b/nuttx/include/cxx/cunistd
@@ -66,7 +66,7 @@ namespace std
using ::rmdir;
using ::getopt;
using ::getoptargp;
- using ::getopindgp;
+ using ::getoptindp;
using ::getoptoptp;
}
diff --git a/nuttx/include/inttypes.h b/nuttx/include/inttypes.h
index 57bf1184d..9aa1c0497 100644
--- a/nuttx/include/inttypes.h
+++ b/nuttx/include/inttypes.h
@@ -165,7 +165,8 @@ typedef void *imaxdiv_t; /* Dummy type since imaxdiv is not yet supported */
#ifdef __cplusplus
#define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
#else
#define EXTERN extern
#endif
@@ -174,13 +175,13 @@ extern "C" {
* macros. Function prototypes shall be provided."
*/
-EXTERN intmax_t imaxabs(intmax_t);
-EXTERN imaxdiv_t imaxdiv(intmax_t, intmax_t);
-EXTERN intmax_t strtoimax(const char *, char **, int);
-EXTERN uintmax_t strtoumax(const char *, char **, int);
+intmax_t imaxabs(intmax_t);
+imaxdiv_t imaxdiv(intmax_t, intmax_t);
+intmax_t strtoimax(const char *, char **, int);
+uintmax_t strtoumax(const char *, char **, int);
-EXTERN intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
-EXTERN uintmax_t wcstoumax(const wchar_t *, wchar_t **, int);
+intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
+uintmax_t wcstoumax(const wchar_t *, wchar_t **, int);
#undef EXTERN
#ifdef __cplusplus
diff --git a/nuttx/include/nuttx/math.h b/nuttx/include/nuttx/math.h
index c01963cff..d7945ec95 100644
--- a/nuttx/include/nuttx/math.h
+++ b/nuttx/include/nuttx/math.h
@@ -150,6 +150,14 @@ double round (double x);
long double roundl(long double x);
#endif
+float rintf(float x); /* Not implemented */
+#if CONFIG_HAVE_DOUBLE
+double_t rint(double_t x);
+#endif
+#ifdef CONFIG_HAVE_LONG_DOUBLE
+long double rintl(long double x); /* Not implemented */
+#endif
+
float fabsf (float x);
#if CONFIG_HAVE_DOUBLE
double fabs (double x);
diff --git a/nuttx/include/unistd.h b/nuttx/include/unistd.h
index dd1ef3f5a..395b434f5 100644
--- a/nuttx/include/unistd.h
+++ b/nuttx/include/unistd.h
@@ -119,7 +119,7 @@ EXTERN int optind; /* Index into argv */
EXTERN int optopt; /* unrecognized option character */
#else
# define optarg (*(getoptargp()))
-# define optind (*(getopindgp()))
+# define optind (*(getoptindp()))
# define optopt (*(getoptoptp()))
#endif
@@ -183,7 +183,7 @@ int getopt(int argc, FAR char *const argv[], FAR const char *optstring);
*/
FAR char **getoptargp(void); /* Optional argument following option */
-int *getopindgp(void); /* Index into argv */
+int *getoptindp(void); /* Index into argv */
int *getoptoptp(void); /* unrecognized option character */
#undef EXTERN
diff --git a/nuttx/libc/README.txt b/nuttx/libc/README.txt
index 3997b6b3c..4ecc7c299 100644
--- a/nuttx/libc/README.txt
+++ b/nuttx/libc/README.txt
@@ -52,7 +52,7 @@ Library Database
Information about functions available in the NuttX C library information is
maintained in a database. That "database" is implemented as a simple comma-
-separated-value file, lib.csv. Most spreadsheets programs will accept this
+separated-value file, libc.csv. Most spreadsheets programs will accept this
format and can be used to maintain the library database.
This library database will (eventually) be used to generate symbol library
diff --git a/nuttx/libc/fixedmath/Make.defs b/nuttx/libc/fixedmath/Make.defs
index b53df2b2c..e4534184c 100644
--- a/nuttx/libc/fixedmath/Make.defs
+++ b/nuttx/libc/fixedmath/Make.defs
@@ -35,7 +35,7 @@
# Add the fixed precision math C files to the build
-CSRCS += lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c
+CSRCS += lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c
# Add the fixed precision math directory to the build
diff --git a/nuttx/libc/fixedmath/lib_rint.c b/nuttx/libc/fixedmath/lib_rint.c
deleted file mode 100644
index a1212c970..000000000
--- a/nuttx/libc/fixedmath/lib_rint.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/************************************************************
- * libc/fixedmath/lib_rint.c
- *
- * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ************************************************************/
-
-/************************************************************
- * Compilation Switches
- ************************************************************/
-
-/************************************************************
- * Included Files
- ************************************************************/
-
-#include
-#include
-#include
-
-/************************************************************
- * Definitions
- ************************************************************/
-
-/************************************************************
- * Private Type Declarations
- ************************************************************/
-
-/************************************************************
- * Private Function Prototypes
- ************************************************************/
-
-/**********************************************************
- * Global Constant Data
- **********************************************************/
-
-/************************************************************
- * Global Variables
- ************************************************************/
-
-/**********************************************************
- * Private Constant Data
- **********************************************************/
-
-/************************************************************
- * Private Variables
- ************************************************************/
-
-double_t rint(double_t x)
-{
- double_t ret;
-
- /* If the current rounding mode rounds toward negative
- * infinity, rint() is identical to floor(). If the current
- * rounding mode rounds toward positive infinity, rint() is
- * identical to ceil().
- */
-
-#if defined(CONFIG_FP_ROUND_POSITIVE) && CONFIG_FP_ROUNDING_POSITIVE != 0
-
- ret = ceil(x);
-
-#elif defined(CONFIG_FP_ROUND_NEGATIVE) && CONFIG_FP_ROUNDING_NEGATIVE != 0
-
- ret = floor(x);
-
-#else
-
- /* In the default rounding mode (round to nearest), rint(x) is the
- * integer nearest x with the additional stipulation that if
- * |rint(x)-x|=1/2, then rint(x) is even.
- */
-
- long dwinteger = (long)x;
- double_t fremainder = x - (double_t)dwinteger;
-
- if (x < 0.0)
- {
- /* fremainder should be in range 0 .. -1 */
-
- if (fremainder == -0.5)
- {
- dwinteger = ((dwinteger+1)&~1);
- }
- else if (fremainder < -0.5)
- {
- dwinteger--;
- }
- }
- else
- {
- /* fremainder should be in range 0 .. 1 */
-
- if (fremainder == 0.5)
- {
- dwinteger = ((dwinteger+1)&~1);
- }
- else if (fremainder > 0.5)
- {
- dwinteger++;
- }
- }
-
- ret = (double_t)dwinteger;
-#endif
-
- return ret;
-}
diff --git a/nuttx/libc/lib.csv b/nuttx/libc/lib.csv
deleted file mode 100644
index 29cdf39a6..000000000
--- a/nuttx/libc/lib.csv
+++ /dev/null
@@ -1,171 +0,0 @@
-"_inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && !defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","in_addr_t"
-"abort","stdlib.h","","void"
-"abs","stdlib.h","","int","int"
-"asprintf","stdio.h","","int","FAR char **","const char *","..."
-"avsprintf","stdio.h","","int","FAR char **","const char *","va_list"
-"b16atan2","fixedmath.h","","b16_t","b16_t","b16_t"
-"b16cos","fixedmath.h","","b16_t","b16_t"
-"b16divb16","fixedmath.h","","b16_t","b16_t","b16_t"
-"b16mulb16","fixedmath.h","","b16_t","b16_t","b16_t"
-"b16sin","fixedmath.h","","b16_t","b16_t"
-"b16sqr","fixedmath.h","","b16_t","b16_t"
-"basename","libgen.h","","FAR char","FAR char *"
-"cfgetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
-"cfsetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
-"chdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
-"crc32","crc32.h","","uint32_t","FAR const uint8_t *","size_t"
-"crc32part","crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t"
-"dbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG)","int","const char *","..."
-"dirname","libgen.h","","FAR char","FAR char *"
-"dq_addafter","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
-"dq_addbefore","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
-"dq_addfirst","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
-"dq_addlast","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
-"dq_rem","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
-"dq_remfirst","queue.h","","FAR dq_entry_t","dq_queue_t *"
-"dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *"
-"ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *"
-"fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
-"fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
-"fflush","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
-"fgetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
-"fgetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
-"fgets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *","int","FAR FILE *"
-"fileno","stdio.h","","int","FAR FILE *"
-"fopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","FAR const char *","FAR const char *"
-"fprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","..."
-"fputc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int c","FAR FILE *"
-"fputs","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","FAR FILE *"
-"fread","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR void *","size_t","size_t","FAR FILE *"
-"fseek","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","long int","int"
-"fsetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
-"ftell","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
-"fwrite","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
-"getcwd","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
-"getopt","unistd.h","","int","int","FAR char *const[]","FAR const char *"
-"getoptargp","unistd.h","","FAR char *"
-"getoptindp","unistd.h","","int"
-"getoptoptp","unistd.h","","int"
-"gets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *"
-"gmtime","time.h","","struct tm","const time_t *"
-"gmtime_r","time.h","","FAR struct tm","FAR const time_t *","FAR struct tm *"
-"htonl","arpa/inet.h","","uint32_t","uint32_t"
-"htons","arpa/inet.h","","uint16_t","uint16_t"
-"imaxabs","stdlib.h","","intmax_t","intmax_t"
-"inet_addr","arpa/inet.h","","in_addr_t","FAR const char "
-"inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","struct in_addr"
-"inet_ntop","arpa/inet.h","","FAR const char","int","FAR const void *","FAR char *","socklen_t"
-"inet_pton","arpa/inet.h","","int","int","FAR const char *","FAR void *"
-"labs","stdlib.h","","long int","long int"
-"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
-"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
-"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
-"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
-"lowsyslog","syslog.h","","int","FAR const char *","..."
-"match","","","int","const char *","const char *"
-"memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t"
-"memchr","string.h","","FAR void","FAR const void *","int c","size_t"
-"memcmp","string.h","","int","FAR const void *","FAR const void *","size_t"
-"memcpy","string.h","","FAR void","FAR void *","FAR const void *","size_t"
-"memmove","string.h","","FAR void","FAR void *","FAR const void *","size_t"
-"memset","string.h","","FAR void","FAR void *","int c","size_t"
-"mktime","time.h","","time_t","const struct tm *"
-"mq_getattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","struct mq_attr *"
-"mq_setattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const struct mq_attr *","struct mq_attr *"
-"ntohl","arpa/inet.h","","uint32_t","uint32_t"
-"ntohs","arpa/inet.h","","uint16_t","uint16_t"
-"perror","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","void","FAR const char *"
-"printf","stdio.h","","int","const char *","..."
-"pthread_attr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
-"pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
-"pthread_attr_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR struct sched_param *"
-"pthread_attr_getschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int *"
-"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR long *"
-"pthread_attr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
-"pthread_attr_setinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
-"pthread_attr_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR const struct sched_param *"
-"pthread_attr_setschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
-"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","long"
-"pthread_barrierattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
-"pthread_barrierattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_barrierattr_t *","FAR int *"
-"pthread_barrierattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
-"pthread_barrierattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *","int"
-"pthread_condattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
-"pthread_condattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
-"pthread_mutexattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
-"pthread_mutexattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","FAR int *"
-"pthread_mutexattr_gettype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","const pthread_mutexattr_t *","int *"
-"pthread_mutexattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
-"pthread_mutexattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","int "
-"pthread_mutexattr_settype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","pthread_mutexattr_t *","int"
-"puts","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *"
-"qsort","stdlib.h","","void","void *","size_t","size_t","int(*)(const void *","const void *)"
-"rand","stdlib.h","","int"
-"readdir_r","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
-"rint","","","double_t","double_t"
-"sched_get_priority_max","sched.h","","int","int"
-"sched_get_priority_min","sched.h","","int","int"
-"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
-"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
-"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t"
-"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
-"sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
-"sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
-"sigfillset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
-"sigismember","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t *","int"
-"snprintf","stdio.h","","int","FAR char *","size_t","const char *","..."
-"sprintf","stdio.h","","int","FAR char *","const char *","..."
-"sq_addafter","queue.h","","void","FAR sq_entry_t *","FAR sq_entry_t *","FAR sq_queue_t *"
-"sq_addfirst","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
-"sq_addlast","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
-"sq_rem","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
-"sq_remafter","queue.h","","FAR sq_entry_t","FAR sq_entry_t *","sq_queue_t *"
-"sq_remfirst","queue.h","","FAR sq_entry_t","sq_queue_t *"
-"sq_remlast","queue.h","","FAR sq_entry_t","sq_queue_t *"
-"srand","stdlib.h","","void","unsigned int"
-"sscanf","stdio.h","","int","const char *","const char *","..."
-"strcasecmp","string.h","","int","FAR const char *","FAR const char *"
-"strcasestr","string.h","","FAR char","FAR const char *","FAR const char *"
-"strcat","string.h","","FAR char","FAR char *","FAR const char *"
-"strchr","string.h","","FAR char","FAR const char *","int"
-"strcmp","string.h","","int","FAR const char *","FAR const char *"
-"strcpy","string.h","","FAR char","char *","FAR const char *"
-"strcspn","string.h","","size_t","FAR const char *","FAR const char *"
-"strdup","string.h","","FAR char","FAR const char *"
-"strerror","string.h","","FAR const char","int"
-"strftime","time.h","","size_t","char *","size_t","const char *","const struct tm *"
-"strlen","string.h","","size_t","FAR const char *"
-"strncasecmp","string.h","","int","FAR const char *","FAR const char *","size_t"
-"strncat","string.h","","FAR char","FAR char *","FAR const char *","size_t"
-"strncmp","string.h","","int","FAR const char *","FAR const char *","size_t"
-"strncpy","string.h","","FAR char","char *","FAR const char *","size_t"
-"strndup","string.h","","FAR char","FAR const char *","size_t"
-"strnlen","string.h","","size_t","FAR const char *","size_t"
-"strpbrk","string.h","","FAR char","FAR const char *","FAR const char *"
-"strrchr","string.h","","FAR char","FAR const char *","int"
-"strspn","string.h","","size_t","FAR const char *","FAR const char *"
-"strstr","string.h","","FAR char","FAR const char *","FAR const char *"
-"strtod","stdlib.h","","double_t","const char *str","char **endptr"
-"strtok","string.h","","FAR char","FAR char *","FAR const char *"
-"strtok_r","string.h","","FAR char","FAR char *","FAR const char *","FAR char **"
-"strtol","string.h","","long","const char *","char **","int"
-"strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base"
-"strtoul","stdlib.h","","unsigned long","const char *","char **","int"
-"strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int"
-"syslog","syslog.h","","int","FAR const char *","..."
-"syslog_enable","syslog.h","defined(CONFIG_SYSLOG_ENABLE)","void","bool"
-"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
-"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
-"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
-"telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR *"
-"time","time.h","","time_t","time_t *"
-"ub16divub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
-"ub16mulub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
-"ub16sqr","fixedmath.h","","ub16_t","ub16_t"
-"ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
-"vdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)","int","const char *","..."
-"vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","const char *","va_list"
-"vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
-"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
-"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
-"vsscanf","stdio.h","","int","char *","const char *","va_list"
diff --git a/nuttx/libc/libc.csv b/nuttx/libc/libc.csv
new file mode 100644
index 000000000..ec4cfb2e2
--- /dev/null
+++ b/nuttx/libc/libc.csv
@@ -0,0 +1,170 @@
+"_inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && !defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","in_addr_t"
+"abort","stdlib.h","","void"
+"abs","stdlib.h","","int","int"
+"asprintf","stdio.h","","int","FAR char **","const char *","..."
+"avsprintf","stdio.h","","int","FAR char **","const char *","va_list"
+"b16atan2","fixedmath.h","","b16_t","b16_t","b16_t"
+"b16cos","fixedmath.h","","b16_t","b16_t"
+"b16divb16","fixedmath.h","","b16_t","b16_t","b16_t"
+"b16mulb16","fixedmath.h","","b16_t","b16_t","b16_t"
+"b16sin","fixedmath.h","","b16_t","b16_t"
+"b16sqr","fixedmath.h","","b16_t","b16_t"
+"basename","libgen.h","","FAR char","FAR char *"
+"cfgetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","speed_t","FAR const struct termios *"
+"cfsetspeed","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","FAR struct termios *","speed_t"
+"chdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
+"crc32","crc32.h","","uint32_t","FAR const uint8_t *","size_t"
+"crc32part","crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t"
+"dbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG)","int","const char *","..."
+"dirname","libgen.h","","FAR char","FAR char *"
+"dq_addafter","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
+"dq_addbefore","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *"
+"dq_addfirst","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
+"dq_addlast","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
+"dq_rem","queue.h","","void","FAR dq_entry_t *","dq_queue_t *"
+"dq_remfirst","queue.h","","FAR dq_entry_t","dq_queue_t *"
+"dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *"
+"ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *"
+"fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
+"fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *"
+"fflush","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
+"fgetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *"
+"fgetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
+"fgets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *","int","FAR FILE *"
+"fileno","stdio.h","","int","FAR FILE *"
+"fopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","FAR const char *","FAR const char *"
+"fprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR const char *","..."
+"fputc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int c","FAR FILE *"
+"fputs","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","FAR FILE *"
+"fread","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR void *","size_t","size_t","FAR FILE *"
+"fseek","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","long int","int"
+"fsetpos","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","FAR fpos_t *"
+"ftell","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
+"fwrite","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
+"getcwd","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
+"getopt","unistd.h","","int","int","FAR char *const[]","FAR const char *"
+"getoptargp","unistd.h","","FAR char *"
+"getoptindp","unistd.h","","int"
+"getoptoptp","unistd.h","","int"
+"gets","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR char","FAR char *"
+"gmtime","time.h","","struct tm","const time_t *"
+"gmtime_r","time.h","","FAR struct tm","FAR const time_t *","FAR struct tm *"
+"htonl","arpa/inet.h","","uint32_t","uint32_t"
+"htons","arpa/inet.h","","uint16_t","uint16_t"
+"imaxabs","inttypes.h","","intmax_t","intmax_t"
+"inet_addr","arpa/inet.h","","in_addr_t","FAR const char "
+"inet_ntoa","arpa/inet.h","!defined(CONFIG_NET_IPv6) && defined(CONFIG_CAN_PASS_STRUCTS)","FAR char","struct in_addr"
+"inet_ntop","arpa/inet.h","","FAR const char","int","FAR const void *","FAR char *","socklen_t"
+"inet_pton","arpa/inet.h","","int","int","FAR const char *","FAR void *"
+"labs","stdlib.h","","long int","long int"
+"lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int"
+"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
+"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
+"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
+"lowsyslog","syslog.h","","int","FAR const char *","..."
+"match","nuttx/regex.h","","int","const char *","const char *"
+"memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t"
+"memchr","string.h","","FAR void","FAR const void *","int c","size_t"
+"memcmp","string.h","","int","FAR const void *","FAR const void *","size_t"
+"memcpy","string.h","","FAR void","FAR void *","FAR const void *","size_t"
+"memmove","string.h","","FAR void","FAR void *","FAR const void *","size_t"
+"memset","string.h","","FAR void","FAR void *","int c","size_t"
+"mktime","time.h","","time_t","const struct tm *"
+"mq_getattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","struct mq_attr *"
+"mq_setattr","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const struct mq_attr *","struct mq_attr *"
+"ntohl","arpa/inet.h","","uint32_t","uint32_t"
+"ntohs","arpa/inet.h","","uint16_t","uint16_t"
+"perror","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","void","FAR const char *"
+"printf","stdio.h","","int","const char *","..."
+"pthread_attr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
+"pthread_attr_getinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_attr_t *","FAR int *"
+"pthread_attr_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR struct sched_param *"
+"pthread_attr_getschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int *"
+"pthread_attr_getstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR long *"
+"pthread_attr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *"
+"pthread_attr_setinheritsched","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
+"pthread_attr_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","FAR const struct sched_param *"
+"pthread_attr_setschedpolicy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","int"
+"pthread_attr_setstacksize","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_attr_t *","long"
+"pthread_barrierattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
+"pthread_barrierattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR const pthread_barrierattr_t *","FAR int *"
+"pthread_barrierattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *"
+"pthread_barrierattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrierattr_t *","int"
+"pthread_condattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
+"pthread_condattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_condattr_t *"
+"pthread_mutexattr_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
+"pthread_mutexattr_getpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","FAR int *"
+"pthread_mutexattr_gettype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","const pthread_mutexattr_t *","int *"
+"pthread_mutexattr_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *"
+"pthread_mutexattr_setpshared","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutexattr_t *","int "
+"pthread_mutexattr_settype","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_MUTEX_TYPES)","int","pthread_mutexattr_t *","int"
+"puts","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *"
+"qsort","stdlib.h","","void","void *","size_t","size_t","int(*)(const void *","const void *)"
+"rand","stdlib.h","","int"
+"readdir_r","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR DIR *","FAR struct dirent *","FAR struct dirent **"
+"sched_get_priority_max","sched.h","","int","int"
+"sched_get_priority_min","sched.h","","int","int"
+"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
+"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
+"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t"
+"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
+"sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
+"sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
+"sigfillset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
+"sigismember","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t *","int"
+"snprintf","stdio.h","","int","FAR char *","size_t","const char *","..."
+"sprintf","stdio.h","","int","FAR char *","const char *","..."
+"sq_addafter","queue.h","","void","FAR sq_entry_t *","FAR sq_entry_t *","FAR sq_queue_t *"
+"sq_addfirst","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
+"sq_addlast","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
+"sq_rem","queue.h","","void","FAR sq_entry_t *","sq_queue_t *"
+"sq_remafter","queue.h","","FAR sq_entry_t","FAR sq_entry_t *","sq_queue_t *"
+"sq_remfirst","queue.h","","FAR sq_entry_t","sq_queue_t *"
+"sq_remlast","queue.h","","FAR sq_entry_t","sq_queue_t *"
+"srand","stdlib.h","","void","unsigned int"
+"sscanf","stdio.h","","int","const char *","const char *","..."
+"strcasecmp","string.h","","int","FAR const char *","FAR const char *"
+"strcasestr","string.h","","FAR char","FAR const char *","FAR const char *"
+"strcat","string.h","","FAR char","FAR char *","FAR const char *"
+"strchr","string.h","","FAR char","FAR const char *","int"
+"strcmp","string.h","","int","FAR const char *","FAR const char *"
+"strcpy","string.h","","FAR char","char *","FAR const char *"
+"strcspn","string.h","","size_t","FAR const char *","FAR const char *"
+"strdup","string.h","","FAR char","FAR const char *"
+"strerror","string.h","","FAR const char","int"
+"strftime","time.h","","size_t","char *","size_t","const char *","const struct tm *"
+"strlen","string.h","","size_t","FAR const char *"
+"strncasecmp","string.h","","int","FAR const char *","FAR const char *","size_t"
+"strncat","string.h","","FAR char","FAR char *","FAR const char *","size_t"
+"strncmp","string.h","","int","FAR const char *","FAR const char *","size_t"
+"strncpy","string.h","","FAR char","char *","FAR const char *","size_t"
+"strndup","string.h","","FAR char","FAR const char *","size_t"
+"strnlen","string.h","","size_t","FAR const char *","size_t"
+"strpbrk","string.h","","FAR char","FAR const char *","FAR const char *"
+"strrchr","string.h","","FAR char","FAR const char *","int"
+"strspn","string.h","","size_t","FAR const char *","FAR const char *"
+"strstr","string.h","","FAR char","FAR const char *","FAR const char *"
+"strtod","stdlib.h","","double_t","const char *str","char **endptr"
+"strtok","string.h","","FAR char","FAR char *","FAR const char *"
+"strtok_r","string.h","","FAR char","FAR char *","FAR const char *","FAR char **"
+"strtol","string.h","","long","const char *","char **","int"
+"strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base"
+"strtoul","stdlib.h","","unsigned long","const char *","char **","int"
+"strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int"
+"syslog","syslog.h","","int","FAR const char *","..."
+"syslog_enable","syslog.h","defined(CONFIG_SYSLOG_ENABLE)","void","bool"
+"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
+"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
+"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
+"telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR *"
+"time","time.h","","time_t","time_t *"
+"ub16divub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
+"ub16mulub16","fixedmath.h","","ub16_t","ub16_t","ub16_t"
+"ub16sqr","fixedmath.h","","ub16_t","ub16_t"
+"ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *"
+"vdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)","int","const char *","..."
+"vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","const char *","va_list"
+"vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list"
+"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
+"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
+"vsscanf","stdio.h","","int","char *","const char *","va_list"
diff --git a/nuttx/libc/math.csv b/nuttx/libc/math.csv
new file mode 100644
index 000000000..88b7fc272
--- /dev/null
+++ b/nuttx/libc/math.csv
@@ -0,0 +1,73 @@
+"acos","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"acosf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"acosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"asin","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"asinf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"asinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"atan","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"atan2","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double",double"
+"atan2f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float",float"
+"atan2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double"
+"atanf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"atanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"ceil","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"ceilf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"ceill","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"cos","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"cosf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"cosh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"coshf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"coshl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"cosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"exp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"expf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"expl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"fabs","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"fabsf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"fabsl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"floor","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"floorf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"floorl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"fmod","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double"
+"fmodf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float"
+"fmodl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double"
+"frexp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","int *"
+"frexpf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","int *"
+"frexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double",int *"
+"ldexp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double",int"
+"ldexpf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float",int"
+"ldexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","int"
+"log","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"log10","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"log10f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"log10l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"log2","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"log2f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"log2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"logf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"logl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"modf","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double *"
+"modff","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float *"
+"modfl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double *"
+"pow","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double"
+"powf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float"
+"powl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double"
+"rint","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double_t","double_t"
+"round","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"roundf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"roundl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"sin","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"sinf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"sinh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"sinhf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"sinhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"sinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"sqrt","math.hdefined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","",""
+"sqrtf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"sqrtl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"tan","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"tanf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"tanh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double"
+"tanhf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float"
+"tanhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
+"tanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double"
diff --git a/nuttx/libc/math/Make.defs b/nuttx/libc/math/Make.defs
index ece25f4e5..e4c75b45d 100644
--- a/nuttx/libc/math/Make.defs
+++ b/nuttx/libc/math/Make.defs
@@ -45,7 +45,7 @@ CSRCS += lib_roundf.c lib_sinf.c lib_sinhf.c lib_sqrtf.c lib_tanf.c lib_tanhf.c
CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_ceil.c lib_cos.c
CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_floor.c lib_fmod.c lib_frexp.c
CSRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c
-CSRCS += lib_round.c lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c
+CSRCS += lib_rint.c lib_round.c lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c
CSRCS += lib_acosl.c lib_asinl.c lib_atan2l.c lib_atanl.c lib_ceill.c lib_cosl.c
CSRCS += lib_coshl.c lib_expl.c lib_fabsl.c lib_floorl.c lib_fmodl.c lib_frexpl.c
diff --git a/nuttx/libc/math/lib_rint.c b/nuttx/libc/math/lib_rint.c
new file mode 100644
index 000000000..677d9a6cd
--- /dev/null
+++ b/nuttx/libc/math/lib_rint.c
@@ -0,0 +1,137 @@
+/************************************************************
+ * libc/fixedmath/lib_rint.c
+ *
+ * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************/
+
+/************************************************************
+ * Compilation Switches
+ ************************************************************/
+
+/************************************************************
+ * Included Files
+ ************************************************************/
+
+#include
+
+#include
+#include
+#include
+
+/************************************************************
+ * Definitions
+ ************************************************************/
+
+/************************************************************
+ * Private Type Declarations
+ ************************************************************/
+
+/************************************************************
+ * Private Function Prototypes
+ ************************************************************/
+
+/**********************************************************
+ * Global Constant Data
+ **********************************************************/
+
+/************************************************************
+ * Global Variables
+ ************************************************************/
+
+/**********************************************************
+ * Private Constant Data
+ **********************************************************/
+
+/************************************************************
+ * Private Variables
+ ************************************************************/
+
+double_t rint(double_t x)
+{
+ double_t ret;
+
+ /* If the current rounding mode rounds toward negative
+ * infinity, rint() is identical to floor(). If the current
+ * rounding mode rounds toward positive infinity, rint() is
+ * identical to ceil().
+ */
+
+#if defined(CONFIG_FP_ROUND_POSITIVE) && CONFIG_FP_ROUNDING_POSITIVE != 0
+
+ ret = ceil(x);
+
+#elif defined(CONFIG_FP_ROUND_NEGATIVE) && CONFIG_FP_ROUNDING_NEGATIVE != 0
+
+ ret = floor(x);
+
+#else
+
+ /* In the default rounding mode (round to nearest), rint(x) is the
+ * integer nearest x with the additional stipulation that if
+ * |rint(x)-x|=1/2, then rint(x) is even.
+ */
+
+ long dwinteger = (long)x;
+ double_t fremainder = x - (double_t)dwinteger;
+
+ if (x < 0.0)
+ {
+ /* fremainder should be in range 0 .. -1 */
+
+ if (fremainder == -0.5)
+ {
+ dwinteger = ((dwinteger+1)&~1);
+ }
+ else if (fremainder < -0.5)
+ {
+ dwinteger--;
+ }
+ }
+ else
+ {
+ /* fremainder should be in range 0 .. 1 */
+
+ if (fremainder == 0.5)
+ {
+ dwinteger = ((dwinteger+1)&~1);
+ }
+ else if (fremainder > 0.5)
+ {
+ dwinteger++;
+ }
+ }
+
+ ret = (double_t)dwinteger;
+#endif
+
+ return ret;
+}
diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt
index 17416c651..1a8d7cc88 100644
--- a/nuttx/tools/README.txt
+++ b/nuttx/tools/README.txt
@@ -207,7 +207,7 @@ mksymtab.c, cvsparser.c, and cvsparser.h
Example:
cd nuttx/tools
- cat ../syscall/syscall.csv ../lib/lib.csv | sort >tmp.csv
+ cat ../syscall/syscall.csv ../lib/libc.csv | sort >tmp.csv
./mksymtab.exe tmp.csv tmp.c
mkctags.sh
diff --git a/nuttx/tools/mksymtab.c b/nuttx/tools/mksymtab.c
index da60433dd..ea7877b71 100644
--- a/nuttx/tools/mksymtab.c
+++ b/nuttx/tools/mksymtab.c
@@ -222,6 +222,7 @@ int main(int argc, char **argv, char **envp)
fprintf(outstream, "/* %s: Auto-generated symbol table. Do not edit */\n\n", symtab);
fprintf(outstream, "#include \n");
+ fprintf(outstream, "#include \n");
fprintf(outstream, "#include \n\n");
/* Output all of the require header files */
--
cgit v1.2.3