summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-10-27 20:54:11 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-10-27 20:54:11 +0000
commit9e52993f35bc52c125f5a949105f5a5c4c263b4b (patch)
tree937d5aea38c237e336caeb1d7bc2926989848c2e
parentc7c19f0ac0cfd00bc0ef166782e2cdf961af1e87 (diff)
Add strnlen()
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3054 7fd9a85b-ad96-42d3-883c-3090e2eb8679
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/Documentation/NuttX.html5
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html5
-rw-r--r--nuttx/Documentation/NuttxUserGuide.html1
-rw-r--r--nuttx/configs/README.txt5
-rwxr-xr-xnuttx/configs/avr32dev1/ostest/defconfig1
-rw-r--r--nuttx/configs/c5471evm/defconfig1
-rw-r--r--nuttx/configs/c5471evm/dhcpconfig1
-rw-r--r--nuttx/configs/c5471evm/netconfig1
-rw-r--r--nuttx/configs/c5471evm/nshconfig1
-rwxr-xr-xnuttx/configs/demo9s12ne64/ostest/defconfig1
-rwxr-xr-xnuttx/configs/ea3131/nsh/defconfig1
-rwxr-xr-xnuttx/configs/ea3131/ostest/defconfig1
-rwxr-xr-xnuttx/configs/ea3131/pgnsh/defconfig1
-rwxr-xr-xnuttx/configs/ea3131/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/ea3131/usbstorage/defconfig1
-rw-r--r--nuttx/configs/eagle100/httpd/defconfig1
-rw-r--r--nuttx/configs/eagle100/nettest/defconfig1
-rw-r--r--nuttx/configs/eagle100/nsh/defconfig1
-rw-r--r--nuttx/configs/eagle100/nxflat/defconfig1
-rw-r--r--nuttx/configs/eagle100/ostest/defconfig1
-rw-r--r--nuttx/configs/eagle100/thttpd/defconfig1
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/dhcpd/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/httpd/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/nettest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/nsh/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/poll/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/ostest/defconfig1
-rw-r--r--nuttx/configs/m68332evb/defconfig1
-rwxr-xr-xnuttx/configs/mbed/nsh/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/nsh/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbserial/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbstorage/defconfig1
-rw-r--r--nuttx/configs/mx1ads/ostest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/nettest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/nsh/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/ostest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/poll/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/thttpd/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/udp/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/uip/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/nsh/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/ostest/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/usbstorage/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc2378/nsh/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc2378/ostest/defconfig1
-rwxr-xr-xnuttx/configs/olimex-strp711/nettest/defconfig1
-rw-r--r--nuttx/configs/olimex-strp711/nsh/defconfig1
-rw-r--r--nuttx/configs/olimex-strp711/ostest/defconfig1
-rw-r--r--nuttx/configs/pjrc-8051/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/ostest/defconfig1
-rw-r--r--nuttx/configs/sim/mount/defconfig1
-rw-r--r--nuttx/configs/sim/nettest/defconfig1
-rw-r--r--nuttx/configs/sim/nsh/defconfig1
-rw-r--r--nuttx/configs/sim/nx/defconfig1
-rw-r--r--nuttx/configs/sim/nx/defconfig-x111
-rw-r--r--nuttx/configs/sim/ostest/defconfig1
-rw-r--r--nuttx/configs/sim/pashello/defconfig1
-rw-r--r--nuttx/configs/skp16c26/ostest/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/RIDE/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/nsh/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/ostest/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbstorage/defconfig1
-rw-r--r--nuttx/configs/us7032evb1/nsh/defconfig1
-rw-r--r--nuttx/configs/us7032evb1/ostest/defconfig1
-rw-r--r--nuttx/configs/xtrs/nsh/defconfig1
-rw-r--r--nuttx/configs/xtrs/ostest/defconfig1
-rw-r--r--nuttx/configs/xtrs/pashello/defconfig1
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/defconfig1
-rw-r--r--nuttx/configs/z16f2800100zcog/pashello/defconfig1
-rw-r--r--nuttx/configs/z80sim/nsh/defconfig1
-rw-r--r--nuttx/configs/z80sim/ostest/defconfig1
-rw-r--r--nuttx/configs/z80sim/pashello/defconfig1
-rw-r--r--nuttx/configs/z8encore000zco/ostest/defconfig1
-rw-r--r--nuttx/configs/z8f64200100kit/ostest/defconfig1
-rw-r--r--nuttx/include/string.h3
-rw-r--r--nuttx/lib/Makefile9
-rw-r--r--nuttx/lib/lib_strnlen.c62
90 files changed, 165 insertions, 10 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index d9d73582e8..678a16aaae 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -1316,3 +1316,6 @@
5.13 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+ * lib/lib_strnlen.c -- Added POSIX 2008 strnlen() function. Contributed
+ by Michael Hrabanek.
+
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index fe9110565c..6fffb5cdfd 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: October 26, 2010</p>
+ <p>Last Updated: October 27, 2010</p>
</td>
</tr>
</table>
@@ -1940,6 +1940,9 @@ buildroot-1.8 2009-12-21 &lt;spudmonkey@racsa.co.cr&gt;
<ul><pre>
nuttx-5.13 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
+ * lib/lib_strnlen.c -- Added POSIX 2008 strnlen() function. Contributed
+ by Michael Hrabanek.
+
pascal-2.1 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
buildroot-1.9 2010-xx-xx <spudmonkey@racsa.co.cr>
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 7666a29dfd..a750a04a2f 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -2664,8 +2664,9 @@ build
<p>
<code>CONFIG_ARCH_MEMCPY</code>, <code>CONFIG_ARCH_MEMCMP</code>, <code>CONFIG_ARCH_MEMMOVE</code>,
<code>CONFIG_ARCH_MEMSET</code>, <code>CONFIG_ARCH_STRCMP</code>, <code>CONFIG_ARCH_STRCPY</code>,
- <code>CONFIG_ARCH_STRNCPY</code>, <code>CONFIG_ARCH_STRLEN</code>, <code>CONFIG_ARCH_BZERO</code>,
- <code>CONFIG_ARCH_KMALLOC</code>, <code>CONFIG_ARCH_KZMALLOC</code>, <code>ONFIG_ARCH_KFREE</code>,
+ <code>CONFIG_ARCH_STRNCPY</code>, <code>CONFIG_ARCH_STRLEN</code>, <code>CONFIG_ARCH_STRNLEN</code>,
+ <code>CONFIG_ARCH_BZERO</code>, <code>CONFIG_ARCH_KMALLOC</code>, <code>CONFIG_ARCH_KZMALLOC</code>,
+ <code>ONFIG_ARCH_KFREE</code>,
</p>
</ul>
diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html
index 024e0392de..53bdad919d 100644
--- a/nuttx/Documentation/NuttxUserGuide.html
+++ b/nuttx/Documentation/NuttxUserGuide.html
@@ -6410,6 +6410,7 @@ char *strchr(const char *s, int c);
FAR char *strdup(const char *s);
const char *strerror(int);
size_t strlen(const char *);
+size_t strnlen(const char *, size_t);
char *strcat(char *, const char *);
char *strncat(char *, const char *, size_t);
int strcmp(const char *, const char *);
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 725715e2b5..74e1dc5ffd 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -469,8 +469,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_ARCH_MEMCPY, CONFIG_ARCH_MEMCMP, CONFIG_ARCH_MEMMOVE
CONFIG_ARCH_MEMSET, CONFIG_ARCH_STRCMP, CONFIG_ARCH_STRCPY
- CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_BZERO
- CONFIG_ARCH_KMALLOC, CONFIG_ARCH_KZMALLOC, CONFIG_ARCH_KFREE
+ CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN
+ CONFIG_ARCH_BZERO, CONFIG_ARCH_KMALLOC, CONFIG_ARCH_KZMALLOC
+ CONFIG_ARCH_KFREE
Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig
index 234725b824..982e6f5630 100755
--- a/nuttx/configs/avr32dev1/ostest/defconfig
+++ b/nuttx/configs/avr32dev1/ostest/defconfig
@@ -380,6 +380,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/c5471evm/defconfig b/nuttx/configs/c5471evm/defconfig
index b2d8eb1613..947da1355b 100644
--- a/nuttx/configs/c5471evm/defconfig
+++ b/nuttx/configs/c5471evm/defconfig
@@ -270,6 +270,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/c5471evm/dhcpconfig b/nuttx/configs/c5471evm/dhcpconfig
index f57cc2e3ee..de4e9141f9 100644
--- a/nuttx/configs/c5471evm/dhcpconfig
+++ b/nuttx/configs/c5471evm/dhcpconfig
@@ -270,6 +270,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/c5471evm/netconfig b/nuttx/configs/c5471evm/netconfig
index a96f8fc7ee..34d45e24a0 100644
--- a/nuttx/configs/c5471evm/netconfig
+++ b/nuttx/configs/c5471evm/netconfig
@@ -270,6 +270,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/c5471evm/nshconfig b/nuttx/configs/c5471evm/nshconfig
index e2a924da6b..b1b1844a6d 100644
--- a/nuttx/configs/c5471evm/nshconfig
+++ b/nuttx/configs/c5471evm/nshconfig
@@ -270,6 +270,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig
index 630187b068..e1f5642239 100755
--- a/nuttx/configs/demo9s12ne64/ostest/defconfig
+++ b/nuttx/configs/demo9s12ne64/ostest/defconfig
@@ -348,6 +348,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig
index 0d2774c21c..999af1acee 100755
--- a/nuttx/configs/ea3131/nsh/defconfig
+++ b/nuttx/configs/ea3131/nsh/defconfig
@@ -366,6 +366,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig
index 922482d4c3..1bcf96434e 100755
--- a/nuttx/configs/ea3131/ostest/defconfig
+++ b/nuttx/configs/ea3131/ostest/defconfig
@@ -366,6 +366,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig
index 176dac3abb..3075bcb773 100755
--- a/nuttx/configs/ea3131/pgnsh/defconfig
+++ b/nuttx/configs/ea3131/pgnsh/defconfig
@@ -511,6 +511,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig
index b7b652cf57..9839df9b45 100755
--- a/nuttx/configs/ea3131/usbserial/defconfig
+++ b/nuttx/configs/ea3131/usbserial/defconfig
@@ -368,6 +368,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig
index 40e82d1e88..afcddd46ff 100755
--- a/nuttx/configs/ea3131/usbstorage/defconfig
+++ b/nuttx/configs/ea3131/usbstorage/defconfig
@@ -368,6 +368,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig
index d2a7305a34..72177e5e54 100644
--- a/nuttx/configs/eagle100/httpd/defconfig
+++ b/nuttx/configs/eagle100/httpd/defconfig
@@ -339,6 +339,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig
index 24e889ed59..bab51c1338 100644
--- a/nuttx/configs/eagle100/nettest/defconfig
+++ b/nuttx/configs/eagle100/nettest/defconfig
@@ -339,6 +339,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig
index 2527b3dbc9..9bc045703c 100644
--- a/nuttx/configs/eagle100/nsh/defconfig
+++ b/nuttx/configs/eagle100/nsh/defconfig
@@ -338,6 +338,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig
index 79506968e0..0ba898d607 100644
--- a/nuttx/configs/eagle100/nxflat/defconfig
+++ b/nuttx/configs/eagle100/nxflat/defconfig
@@ -351,6 +351,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig
index 6278051f14..62fa96eb3c 100644
--- a/nuttx/configs/eagle100/ostest/defconfig
+++ b/nuttx/configs/eagle100/ostest/defconfig
@@ -345,6 +345,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig
index 106a4dc095..9591c71374 100644
--- a/nuttx/configs/eagle100/thttpd/defconfig
+++ b/nuttx/configs/eagle100/thttpd/defconfig
@@ -358,6 +358,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index ee3ee1c9b1..d916fe74fe 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -304,6 +304,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
index b15977b624..c22ccb1280 100644
--- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
@@ -310,6 +310,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig
index 27840eecb4..e2d7c0e01b 100644
--- a/nuttx/configs/ez80f910200zco/httpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/httpd/defconfig
@@ -310,6 +310,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig
index 6679e9375c..842b095ef3 100644
--- a/nuttx/configs/ez80f910200zco/nettest/defconfig
+++ b/nuttx/configs/ez80f910200zco/nettest/defconfig
@@ -310,6 +310,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig
index 91bc884b88..28da9ba4d3 100644
--- a/nuttx/configs/ez80f910200zco/nsh/defconfig
+++ b/nuttx/configs/ez80f910200zco/nsh/defconfig
@@ -310,6 +310,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index 11f079c195..e43c6c1fa8 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -307,6 +307,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig
index 899d976b21..245adc8a51 100644
--- a/nuttx/configs/ez80f910200zco/poll/defconfig
+++ b/nuttx/configs/ez80f910200zco/poll/defconfig
@@ -310,6 +310,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index e49de56965..7ea3ef1e19 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -360,6 +360,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index 714a4dfca1..f1c020a004 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -361,6 +361,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index af390f2f5e..1a6307ff90 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -359,6 +359,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig
index f4c4789057..b1009f71f3 100755
--- a/nuttx/configs/lm3s8962-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig
@@ -360,6 +360,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig
index f9a80a063b..4cbdb34b07 100755
--- a/nuttx/configs/lm3s8962-ek/nx/defconfig
+++ b/nuttx/configs/lm3s8962-ek/nx/defconfig
@@ -361,6 +361,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig
index 6e9505dce1..4d55397caf 100755
--- a/nuttx/configs/lm3s8962-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig
@@ -359,6 +359,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig
index 8e8f0cefc9..f9750900e8 100644
--- a/nuttx/configs/m68332evb/defconfig
+++ b/nuttx/configs/m68332evb/defconfig
@@ -236,6 +236,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig
index eb2a095989..2986cdb0ae 100755
--- a/nuttx/configs/mbed/nsh/defconfig
+++ b/nuttx/configs/mbed/nsh/defconfig
@@ -371,6 +371,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index 1d77d5c419..1c1bc78c77 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -274,6 +274,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
index b3ce31e81a..40a997e44a 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
@@ -274,6 +274,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
index 109fcee6b4..f8921b1260 100644
--- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
@@ -274,6 +274,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
index 39dfe7b888..c910a9a23c 100644
--- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
@@ -275,6 +275,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig
index 11b3f36cc9..b705f5a0d3 100644
--- a/nuttx/configs/mx1ads/ostest/defconfig
+++ b/nuttx/configs/mx1ads/ostest/defconfig
@@ -290,6 +290,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig
index 51c65016a0..cc03db7cf8 100644
--- a/nuttx/configs/ntosd-dm320/nettest/defconfig
+++ b/nuttx/configs/ntosd-dm320/nettest/defconfig
@@ -278,6 +278,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig
index 9224d6ac61..9dd069fd93 100644
--- a/nuttx/configs/ntosd-dm320/nsh/defconfig
+++ b/nuttx/configs/ntosd-dm320/nsh/defconfig
@@ -277,6 +277,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig
index e02f2f6bb9..4966efdc8d 100644
--- a/nuttx/configs/ntosd-dm320/ostest/defconfig
+++ b/nuttx/configs/ntosd-dm320/ostest/defconfig
@@ -278,6 +278,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig
index d46dcb0b1b..6e6ca0f4e8 100644
--- a/nuttx/configs/ntosd-dm320/poll/defconfig
+++ b/nuttx/configs/ntosd-dm320/poll/defconfig
@@ -278,6 +278,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig
index 3622471af6..83a8245bd4 100644
--- a/nuttx/configs/ntosd-dm320/thttpd/defconfig
+++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig
@@ -303,6 +303,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig
index bb5af256a2..b2fbe192dd 100644
--- a/nuttx/configs/ntosd-dm320/udp/defconfig
+++ b/nuttx/configs/ntosd-dm320/udp/defconfig
@@ -278,6 +278,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig
index 9e81ab7577..e604067f5f 100644
--- a/nuttx/configs/ntosd-dm320/uip/defconfig
+++ b/nuttx/configs/ntosd-dm320/uip/defconfig
@@ -278,6 +278,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig
index 06b9a84c03..6c529e56a5 100755
--- a/nuttx/configs/nucleus2g/nsh/defconfig
+++ b/nuttx/configs/nucleus2g/nsh/defconfig
@@ -371,6 +371,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig
index ab7740c388..0a03431348 100755
--- a/nuttx/configs/nucleus2g/ostest/defconfig
+++ b/nuttx/configs/nucleus2g/ostest/defconfig
@@ -371,6 +371,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig
index 93ef69bfc4..b991857db5 100755
--- a/nuttx/configs/nucleus2g/usbserial/defconfig
+++ b/nuttx/configs/nucleus2g/usbserial/defconfig
@@ -372,6 +372,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig
index 2e1aa83224..ee883d403d 100755
--- a/nuttx/configs/nucleus2g/usbstorage/defconfig
+++ b/nuttx/configs/nucleus2g/usbstorage/defconfig
@@ -372,6 +372,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig
index dc960eddf6..73b7fad0b6 100755
--- a/nuttx/configs/olimex-lpc2378/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig
@@ -264,6 +264,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig
index 7dd1af6028..6f92f20857 100755
--- a/nuttx/configs/olimex-lpc2378/ostest/defconfig
+++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig
@@ -264,6 +264,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig
index a91ad272c5..09f6312c6c 100755
--- a/nuttx/configs/olimex-strp711/nettest/defconfig
+++ b/nuttx/configs/olimex-strp711/nettest/defconfig
@@ -365,6 +365,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig
index ab4d26a5c5..36e74bc97d 100644
--- a/nuttx/configs/olimex-strp711/nsh/defconfig
+++ b/nuttx/configs/olimex-strp711/nsh/defconfig
@@ -341,6 +341,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig
index 2aa5fd825d..5093468179 100644
--- a/nuttx/configs/olimex-strp711/ostest/defconfig
+++ b/nuttx/configs/olimex-strp711/ostest/defconfig
@@ -341,6 +341,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig
index 878daddb4a..4eeac61142 100644
--- a/nuttx/configs/pjrc-8051/defconfig
+++ b/nuttx/configs/pjrc-8051/defconfig
@@ -234,6 +234,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig
index a01555654a..3bf81b9b44 100755
--- a/nuttx/configs/sam3u-ek/nsh/defconfig
+++ b/nuttx/configs/sam3u-ek/nsh/defconfig
@@ -368,6 +368,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig
index 16b0a79c3d..06ed91880f 100755
--- a/nuttx/configs/sam3u-ek/nx/defconfig
+++ b/nuttx/configs/sam3u-ek/nx/defconfig
@@ -369,6 +369,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig
index 8f42884b20..fe9d96cbaa 100755
--- a/nuttx/configs/sam3u-ek/ostest/defconfig
+++ b/nuttx/configs/sam3u-ek/ostest/defconfig
@@ -369,6 +369,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig
index 606d69c596..c7bd8329c0 100644
--- a/nuttx/configs/sim/mount/defconfig
+++ b/nuttx/configs/sim/mount/defconfig
@@ -183,6 +183,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig
index d2c10377fb..549497092f 100644
--- a/nuttx/configs/sim/nettest/defconfig
+++ b/nuttx/configs/sim/nettest/defconfig
@@ -183,6 +183,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig
index 1cda58d481..381e719561 100644
--- a/nuttx/configs/sim/nsh/defconfig
+++ b/nuttx/configs/sim/nsh/defconfig
@@ -183,6 +183,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig
index cebea94dda..580b78a29a 100644
--- a/nuttx/configs/sim/nx/defconfig
+++ b/nuttx/configs/sim/nx/defconfig
@@ -191,6 +191,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/nx/defconfig-x11 b/nuttx/configs/sim/nx/defconfig-x11
index 8cb26d2018..fd7699fca5 100644
--- a/nuttx/configs/sim/nx/defconfig-x11
+++ b/nuttx/configs/sim/nx/defconfig-x11
@@ -191,6 +191,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig
index 01cad9c580..29e42a8133 100644
--- a/nuttx/configs/sim/ostest/defconfig
+++ b/nuttx/configs/sim/ostest/defconfig
@@ -183,6 +183,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig
index 7c8b356ae2..533f93ac07 100644
--- a/nuttx/configs/sim/pashello/defconfig
+++ b/nuttx/configs/sim/pashello/defconfig
@@ -183,6 +183,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig
index 9132a4a05c..edea106521 100644
--- a/nuttx/configs/skp16c26/ostest/defconfig
+++ b/nuttx/configs/skp16c26/ostest/defconfig
@@ -281,6 +281,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig
index 9c2a78c4d5..9c948f966b 100755
--- a/nuttx/configs/stm3210e-eval/RIDE/defconfig
+++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig
@@ -392,6 +392,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig
index 757c0ee454..604e00dcf3 100755
--- a/nuttx/configs/stm3210e-eval/nsh/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh/defconfig
@@ -401,6 +401,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig
index 30c2346f82..9bdcf85001 100755
--- a/nuttx/configs/stm3210e-eval/ostest/defconfig
+++ b/nuttx/configs/stm3210e-eval/ostest/defconfig
@@ -403,6 +403,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig
index f328ffc542..3fb27d2b8c 100755
--- a/nuttx/configs/stm3210e-eval/usbserial/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig
@@ -404,6 +404,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
index d0d665dcff..42d005307f 100755
--- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
@@ -403,6 +403,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig
index 6c3d9ff1a1..65d5c60f93 100644
--- a/nuttx/configs/us7032evb1/nsh/defconfig
+++ b/nuttx/configs/us7032evb1/nsh/defconfig
@@ -285,6 +285,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig
index a06b331229..b87e4705a8 100644
--- a/nuttx/configs/us7032evb1/ostest/defconfig
+++ b/nuttx/configs/us7032evb1/ostest/defconfig
@@ -285,6 +285,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig
index 8df793ebda..ade89d8fcf 100644
--- a/nuttx/configs/xtrs/nsh/defconfig
+++ b/nuttx/configs/xtrs/nsh/defconfig
@@ -230,6 +230,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig
index f9f92ccbac..78de1e491d 100644
--- a/nuttx/configs/xtrs/ostest/defconfig
+++ b/nuttx/configs/xtrs/ostest/defconfig
@@ -230,6 +230,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig
index e40a1c00f8..22685f05ac 100644
--- a/nuttx/configs/xtrs/pashello/defconfig
+++ b/nuttx/configs/xtrs/pashello/defconfig
@@ -230,6 +230,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig
index d77f486b8f..0a173b0087 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/defconfig
+++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig
@@ -258,6 +258,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig
index 61409a6af2..8a7ede12a7 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/defconfig
+++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig
@@ -258,6 +258,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig
index 3616c0f352..18741528da 100644
--- a/nuttx/configs/z80sim/nsh/defconfig
+++ b/nuttx/configs/z80sim/nsh/defconfig
@@ -220,6 +220,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig
index 2c6fc0fda0..6045ca4b49 100644
--- a/nuttx/configs/z80sim/ostest/defconfig
+++ b/nuttx/configs/z80sim/ostest/defconfig
@@ -220,6 +220,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig
index 6a740d231b..1e36a9bd92 100644
--- a/nuttx/configs/z80sim/pashello/defconfig
+++ b/nuttx/configs/z80sim/pashello/defconfig
@@ -220,6 +220,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig
index 73b8490c89..aa162c5961 100644
--- a/nuttx/configs/z8encore000zco/ostest/defconfig
+++ b/nuttx/configs/z8encore000zco/ostest/defconfig
@@ -254,6 +254,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig
index dc070f1432..e534908c31 100644
--- a/nuttx/configs/z8f64200100kit/ostest/defconfig
+++ b/nuttx/configs/z8f64200100kit/ostest/defconfig
@@ -254,6 +254,7 @@ CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
+CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
CONFIG_ARCH_KMALLOC=n
CONFIG_ARCH_KZMALLOC=n
diff --git a/nuttx/include/string.h b/nuttx/include/string.h
index b538fc4e95..4aa5a48dca 100644
--- a/nuttx/include/string.h
+++ b/nuttx/include/string.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/string.h
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -64,6 +64,7 @@ EXTERN char *strchr(const char *s, int c);
EXTERN FAR char *strdup(const char *s);
EXTERN const char *strerror(int);
EXTERN size_t strlen(const char *);
+EXTERN size_t strnlen(const char *, size_t);
EXTERN char *strcat(char *, const char *);
EXTERN char *strncat(char *, const char *, size_t);
EXTERN int strcmp(const char *, const char *);
diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile
index a08e721562..a3a0c61811 100644
--- a/nuttx/lib/Makefile
+++ b/nuttx/lib/Makefile
@@ -46,10 +46,11 @@ endif
STRING_SRCS = lib_checkbase.c lib_isbasedigit.c lib_memset.c lib_memcpy.c \
lib_memcmp.c lib_memmove.c lib_skipspace.c lib_strcasecmp.c \
lib_strcat.c lib_strchr.c lib_strcpy.c lib_strcmp.c lib_strcspn.c \
- lib_strdup.c lib_strerror.c lib_strlen.c lib_strncasecmp.c \
- lib_strncat.c lib_strncmp.c lib_strncpy.c lib_strpbrk.c \
- lib_strrchr.c lib_strspn.c lib_strstr.c lib_strtok.c lib_strtokr.c \
- lib_strtol.c lib_strtoll.c lib_strtoul.c lib_strtoull.c lib_strtod.c
+ lib_strdup.c lib_strerror.c lib_strlen.c lib_strnlen.c \
+ lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \
+ lib_strpbrk.c lib_strrchr.c lib_strspn.c lib_strstr.c lib_strtok.c \
+ lib_strtokr.c lib_strtol.c lib_strtoll.c lib_strtoul.c \
+ lib_strtoull.c lib_strtod.c
CTYPE_SRCS =
diff --git a/nuttx/lib/lib_strnlen.c b/nuttx/lib/lib_strnlen.c
new file mode 100644
index 0000000000..f6624a64f6
--- /dev/null
+++ b/nuttx/lib/lib_strnlen.c
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * lib/lib_strnlen.c
+ *
+ * This file is part of NuttX, contributed by Michael Hrabanek
+ *
+ * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Author: Michael Hrabanek
+ *
+ * Derives from the file lib/lib_strlen.c:
+ *
+ * Copyright (C) 2007, 2008, 2010 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <sys/types.h>
+#include <string.h>
+
+/****************************************************************************
+ * Global Functions
+ ****************************************************************************/
+
+#ifndef CONFIG_ARCH_STRNLEN
+size_t strnlen(const char *s, size_t maxlen)
+{
+ const char *sc;
+ for (sc = s; maxlen != 0 && *sc != '\0'; maxlen--, ++sc);
+ return sc - s;
+}
+#endif