summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-06-27 08:14:07 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-06-27 08:14:07 -0600
commit7755d921a8a04fdd7a335bcc45d78747ead15f2b (patch)
treeb5a55fb0fc9c53a30eebe32038564f392a55766f /nuttx
parent466c29f48dfc265e8ce908dd95e593a96560525e (diff)
downloadpx4-nuttx-7755d921a8a04fdd7a335bcc45d78747ead15f2b.tar.gz
px4-nuttx-7755d921a8a04fdd7a335bcc45d78747ead15f2b.tar.bz2
px4-nuttx-7755d921a8a04fdd7a335bcc45d78747ead15f2b.zip
Various changes associated with symbol tables. Most from Pelle Windestam
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/Documentation/NuttXNxFlat.html7
-rw-r--r--nuttx/configs/README.txt2
-rw-r--r--nuttx/include/cxx/cunistd2
-rw-r--r--nuttx/include/inttypes.h15
-rw-r--r--nuttx/include/nuttx/math.h8
-rw-r--r--nuttx/include/unistd.h4
-rw-r--r--nuttx/libc/README.txt2
-rw-r--r--nuttx/libc/fixedmath/Make.defs2
-rw-r--r--nuttx/libc/libc.csv (renamed from nuttx/libc/lib.csv)5
-rw-r--r--nuttx/libc/math.csv73
-rw-r--r--nuttx/libc/math/Make.defs2
-rw-r--r--nuttx/libc/math/lib_rint.c (renamed from nuttx/libc/fixedmath/lib_rint.c)2
-rw-r--r--nuttx/tools/README.txt2
-rw-r--r--nuttx/tools/mksymtab.c1
14 files changed, 107 insertions, 20 deletions
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.
<code>nuttx/syscall/syscall.csv</code> that describes the NuttX RTOS interface, and
</li>
<li>
- <code>nuttx/libc/lib.csv</code> that describes the NuttX C library interface.
+ <code>nuttx/libc/libc.csv</code> that describes the NuttX C library interface.
+ </li>
+ <li>
+ <code>nuttx/libc/math.cvs</code> that descirbes any math library.
</li>
</ol>
<ul><pre>
@@ -424,7 +427,7 @@ Where:
</p>
<ul><pre>
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
</pre></ul>
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/lib.csv b/nuttx/libc/libc.csv
index 29cdf39a6..ec4cfb2e2 100644
--- a/nuttx/libc/lib.csv
+++ b/nuttx/libc/libc.csv
@@ -51,7 +51,7 @@
"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"
+"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"
@@ -62,7 +62,7 @@
"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 *"
+"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"
@@ -102,7 +102,6 @@
"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 *"
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/fixedmath/lib_rint.c b/nuttx/libc/math/lib_rint.c
index a1212c970..677d9a6cd 100644
--- a/nuttx/libc/fixedmath/lib_rint.c
+++ b/nuttx/libc/math/lib_rint.c
@@ -42,8 +42,10 @@
************************************************************/
#include <nuttx/config.h>
+
#include <sys/types.h>
#include <stdlib.h>
+#include <math.h>
/************************************************************
* Definitions
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 <nuttx/config.h>\n");
+ fprintf(outstream, "#include <nuttx/compiler.h>\n");
fprintf(outstream, "#include <nuttx/binfmt/symtab.h>\n\n");
/* Output all of the require header files */