diff --git a/ChangeLog b/ChangeLog
index c863f37d8342fbe394e3f25dff3d3fae7e16cf9d..3fac746139dafe7a909e96083ba2cbf2bfa7c032 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -775,3 +775,5 @@
 
 0.4.8 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
 
+	* Add strtoll() and strtoull(); Add macros for atol() and atoll().
+
diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html
index 3235811d5c2e9572ee103a4f51043bdef5b01577..044938d8d9c3debe4590afda068fe2c33b7bb3b5 100644
--- a/Documentation/NuttX.html
+++ b/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: June 13, 2009</p>
+      <p>Last Updated: June 14, 2009</p>
     </td>
   </tr>
 </table>
@@ -1470,6 +1470,8 @@ buildroot-0.1.6 2009-xx-xx &lt;spudmonkey@racsa.co.cr&gt;
 <pre><ul>
 nuttx-0.4.9 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
 
+	* Add strtoll() and strtoull(); Add macros for atol() and atoll().
+
 pascal-0.1.3 2009-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
 
 buildroot-0.1.7 2009-xx-xx &lt;spudmonkey@racsa.co.cr&gt;
diff --git a/TODO b/TODO
index 001e511bb8d080842e74356cb27b6e36c9fe7cf2..78c6870006eec6333120ad3f96d20d821de9b645 100644
--- a/TODO
+++ b/TODO
@@ -18,7 +18,7 @@ NuttX TODO List (Last updated April 12, 2009)
   (2)  NuttShell (NSH) (examples/nsh)
   (3)  Other Applications & Tests (examples/)
   (1)  Linux/Cywgin simulation (arch/sim)
-  (2)  ARM (arch/arm/)
+  (3)  ARM (arch/arm/)
   (1)  ARM/C5471 (arch/arm/src/c5471/)
   (3)  ARM/DM320 (arch/arm/src/dm320/)
   (2)  ARM/i.MX (arch/arm/src/imx/)
@@ -428,6 +428,13 @@ o ARM (arch/arm/)
   Status:      Open
   Priority:    Low
 
+  Description: The Cortex-M3 user context swich logic uses SVCall instructions.
+               This user context switching time could be improved by eliminating
+               the SVCalls and developing assembly language implementations
+               of the context save and restore logic.
+  Status:      Open
+  Priority:    Low
+
 o ARM/C5471 (arch/arm/src/c5471/)
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/include/stdlib.h b/include/stdlib.h
index 92437a574c822401d04f998a42d68d46130922fb..645998754322f856d28a7e3b4ea37f5a456f5e44 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -120,9 +120,19 @@ EXTERN int       atexit(void (*func)(void));
 
 /* String to binary conversions */
 
-#define atoi(nptr) strtol((nptr), (FAR char**)NULL, 10)
 EXTERN long      strtol(const char *, char **, int);
-EXTERN double_t  strtod(const char *, char **);
+EXTERN unsigned long strtoul(const char *, char **, int);
+#ifdef CONFIG_HAVE_LONG_LONG
+EXTERN long long strtoll(const char *, char **, int);
+EXTERN unsigned long long strtoull(const char *, char **, int);
+#endif
+EXTERN double_t   strtod(const char *, char **);
+
+#define atoi(nptr)  strtol((nptr), NULL, 10);
+#define atol(nptr)  strtol((nptr), NULL, 10);
+#ifdef CONFIG_HAVE_LONG_LONG
+#define atoll(nptr) strtoll((nptr), NULL, 10);
+#endif
 
 /* Memory Management */
 
diff --git a/lib/Makefile b/lib/Makefile
index 9b023d04e1fa03659979e763c0d819198fe95d72..bef36aad84e93ebc80c498d907731e8cf7619201 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,7 +1,7 @@
 ############################################################################
 # lib/Makefile
 #
-#   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+#   Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
 #   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
 #
 # Redistribution and use in source and binary forms, with or without
@@ -43,12 +43,13 @@ ifneq ($(CONFIG_NFILE_STREAMS),0)
 MISC_SRCS	+= lib_streamsem.c
 endif
 
-STRING_SRCS	= lib_memset.c lib_memcpy.c lib_memcmp.c lib_memmove.c \
-		  lib_strcpy.c lib_strncpy.c lib_strcmp.c lib_strncmp.c \
-		  lib_strcasecmp.c lib_strncasecmp.c lib_strlen.c lib_strdup.c \
-		  lib_strcat.c lib_strncat.c lib_strtol.c lib_strchr.c \
-		  lib_strrchr.c lib_strspn.c lib_strcspn.c lib_strtok.c \
-		  lib_strtokr.c lib_strerror.c
+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_strrchr.c  \
+		  lib_strspn.c lib_strtok.c lib_strtokr.c lib_strtol.c lib_strtoll.c \
+		  lib_strtoul.c lib_strtoull.c
 
 CTYPE_SRCS	= 
 
diff --git a/lib/lib_checkbase.c b/lib/lib_checkbase.c
new file mode 100644
index 0000000000000000000000000000000000000000..bf4dadf02d66f09651ae1be8b616909147adb0d7
--- /dev/null
+++ b/lib/lib_checkbase.c
@@ -0,0 +1,114 @@
+/****************************************************************************
+ * lib_checkbase.c
+ *
+ *   Copyright (C) 2007, 2009 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>
+#include <ctype.h>
+#include "lib_internal.h"
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lib_checkbase
+ *
+ * Description:
+ *   This is part of the strol() family implementation.  This function checks
+ *   the initial part of a string to see if it can determine the numeric
+ *   base that is represented.
+ *
+ * Assumptions:
+ *   *ptr points to the first, non-whitespace character in the string.
+ *
+ ****************************************************************************/
+ 
+int lib_checkbase(int base, const char **pptr)
+{
+   const char *ptr = *pptr;
+
+  /* Check for unspecified base */
+
+  if (!base)
+    {
+      /* Assume base 10 */
+
+      base = 10;
+
+      /* Check for leading '0' - that would signify octal or hex (or binary) */
+
+      if (*ptr == '0')
+        {
+          /* Assume octal */
+
+          base = 8;
+          ptr++;
+
+          /* Check for hexidecimal */
+
+          if ((*ptr == 'X' || *ptr == 'x') && 
+              lib_isbasedigit(ptr[1], 16, NULL))
+            {
+              base = 16;
+              ptr++;
+            }
+        }
+    }
+
+  /* If it a hexidecimal representation, than discard any leading "0X" or "0x" */
+
+  else if (base == 16)
+    {
+      if (ptr[0] == '0' && (ptr[1] == 'X' || ptr[1] == 'x'))
+        {
+          ptr += 2;
+        }
+    }
+
+  /* Return the updated pointer and base */
+
+  *pptr = ptr;
+  return base;
+}
+
diff --git a/lib/lib_internal.h b/lib/lib_internal.h
index f6eabe6bcae61e13d4cd1aa5c512edba0e4f391f..9e5b55f9326a011a0de05d23efcfde72fc62db6e 100644
--- a/lib/lib_internal.h
+++ b/lib/lib_internal.h
@@ -131,4 +131,16 @@ extern void lib_give_semaphore(FAR struct file_struct *stream);
 
 extern int lib_getbase(const char *nptr, const char **endptr);
 
+/* Defined in lib_skipspace.c */
+
+extern void lib_skipspace(const char **pptr);
+
+/* Defined in lib_isbasedigit.c */
+
+extern boolean lib_isbasedigit(int ch, int base, int *value);
+
+/* Defined in lib_checkbase.c */
+
+extern int lib_checkbase(int base, const char **pptr);
+
 #endif /* __LIB_INTERNAL_H */
diff --git a/lib/lib_isbasedigit.c b/lib/lib_isbasedigit.c
new file mode 100644
index 0000000000000000000000000000000000000000..c3976ea86aa2f4405de26b743d10e7edaf9bc660
--- /dev/null
+++ b/lib/lib_isbasedigit.c
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * lib/lib_isbasedigit.c
+ *
+ *   Copyright (C) 2007, 2009 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>
+#include <ctype.h>
+#include "lib_internal.h"
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lib_isbasedigit
+ *
+ * Description:
+ *   Given an ASCII character, ch, and a base (1-36) do two
+ *   things:  1) Determine if ch is a valid charcter, and 2)
+ *   convert ch to its binary value.
+ *
+ ****************************************************************************/
+
+boolean lib_isbasedigit(int ch, int base, int *value)
+{
+  boolean ret = FALSE;
+  int    tmp = 0;
+
+  if (base <= 10)
+    {
+      if (ch >= '0' && ch <= base + '0' - 1)
+        {
+          tmp = ch - '0';
+          ret = TRUE;
+        }
+    }
+  else if (base <= 36)
+    {
+      if (ch >= '0' && ch <= '9')
+        {
+          tmp = ch - '0';
+          ret =TRUE;
+        }
+      else if (ch >= 'a' && ch <= 'a' + base - 11)
+        {
+          tmp = ch - 'a' + 10;
+          ret = TRUE;
+        }
+      else if (ch >= 'A' && ch <= 'A' + base - 11)
+        {
+          tmp = ch - 'A' + 10;
+          ret = TRUE;
+        }
+    }
+
+  if (value)
+    {
+      *value = tmp;
+    }
+  return ret;
+}
+
+
diff --git a/lib/lib_skipspace.c b/lib/lib_skipspace.c
new file mode 100644
index 0000000000000000000000000000000000000000..d111645e78a167b037e975a2da0241be198e9b2a
--- /dev/null
+++ b/lib/lib_skipspace.c
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * lib/lib_skipspace.c
+ *
+ *   Copyright (C) 2007, 2009 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>
+#include <ctype.h>
+#include "lib_internal.h"
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lib_skipspace
+ *
+ * Description:
+ *   Skip over leading whitespace
+ *
+ ****************************************************************************/
+
+void lib_skipspace(const char **pptr)
+{
+   const char *ptr = *pptr;
+   while (isspace(*ptr)) ptr++;
+   *pptr = ptr;
+}
+
+
diff --git a/lib/lib_strtol.c b/lib/lib_strtol.c
index 8e2d26f3f6a2ddb28d5f1f6c819bf64dcd6a4960..dcd37652369cb954404a58e1b251ccde04bbb8c3 100644
--- a/lib/lib_strtol.c
+++ b/lib/lib_strtol.c
@@ -1,4 +1,4 @@
-/************************************************************
+/****************************************************************************
  * lib_strtol.c
  *
  *   Copyright (C) 2007 Gregory Nutt. All rights reserved.
@@ -14,7 +14,7 @@
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 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.
  *
@@ -31,80 +31,41 @@
  * 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>
-#include <ctype.h>
+#include <stdlib.h>
+#include "lib_internal.h"
 
-/************************************************************
+/****************************************************************************
  * Private Functions
- ************************************************************/
+ ****************************************************************************/
 
-/* Skip leading spaces */
-
-static void lib_skipspace(const char **nptr)
-{
-   register const char *tmp = *nptr;
-   while (isspace(*tmp)) tmp++;
-   *nptr = tmp;
-}
-
-static int lib_isbasedigit(int c, int base, int *value)
-{
-  int tmp = 0;
-  int ret = 0;
-
-  if (base <= 10)
-    {
-      if (c >= '0' && c <= base + '0' - 1)
-        {
-          tmp = c - '0';
-          ret = 1;
-        }
-    }
-  else if (base <= 36)
-    {
-      if (c >= '0' && c <= '9')
-        {
-          tmp = c - '0';
-          ret = 1;
-        }
-      else if (c >= 'a' && c <= 'a' + base - 11)
-        {
-          tmp = c - 'a' + 10;
-          ret = 1;
-        }
-      else if (c >= 'A' && c <= 'A' + base - 11)
-        {
-          tmp = c - 'A' + 10;
-          ret = 1;
-        }
-    }
-
-  if (value)
-    {
-      *value = tmp;
-    }
-  return ret;
-}
-
-/************************************************************
+/****************************************************************************
  * Public Functions
- ************************************************************/
-
-/* Limited to base 1-36 */
+ ****************************************************************************/
 
+/****************************************************************************
+ * Name: strtol
+ *
+ * Description:
+ *   The  strtol() function  converts  the initial part of the string in
+ *   nptr to a long integer value according to the given base, which must be
+ *   between 2 and 36 inclusive, or be the special value 0.
+ *
+ * Warning: does not check for integer overflow!
+ *
+ ****************************************************************************/
+ 
 long strtol(const char *nptr, char **endptr, int base)
 {
   unsigned long accum = 0;
-  int value;
-  int negate = 0;
+  boolean negate = FALSE;
 
   if (nptr)
     {
@@ -116,51 +77,19 @@ long strtol(const char *nptr, char **endptr, int base)
 
       if (*nptr == '-')
         {
-          negate = 1;
+          negate = TRUE;
           nptr++;
-          lib_skipspace(&nptr);
         }
       else if (*nptr == '+')
         {
           nptr++;
-          lib_skipspace(&nptr);
         }
 
-      /* Check for unspecified base */
+      /* Get the unsigned value */
 
-      if (!base)
-        {
-          base = 10;
-          if (*nptr == '0')
-            {
-              base = 8;
-              nptr++;
-              if ((*nptr == 'X' || *nptr == 'x') && 
-                  lib_isbasedigit(nptr[1], 16, NULL))
-                {
-                  base = 16;
-                  nptr++;
-                }
-            }
-        }
-      else if (base == 16)
-        {
-          if (nptr[0] == '0' && (nptr[1] == 'X' || nptr[1] == 'x'))
-            {
-              nptr += 2;
-            }
-        }
+      accum = strtoul(nptr, endptr, base);
 
-      while (lib_isbasedigit(*nptr, base, &value))
-        {
-            accum = accum*base + value;
-            nptr++;
-        }
-
-      if (endptr)
-        {
-          *endptr = (char *)nptr;
-        }
+      /* Correct the sign of the result */
 
       if (negate)
         {
@@ -170,7 +99,3 @@ long strtol(const char *nptr, char **endptr, int base)
   return (long)accum;
 }
 
-unsigned long strtoul(const char *nptr, char **endptr, int base)
-{
-   return (unsigned long)strtol(nptr, endptr, base);
-}
diff --git a/lib/lib_strtoll.c b/lib/lib_strtoll.c
new file mode 100644
index 0000000000000000000000000000000000000000..6566d75c62aa464b8fbb273bb928429751b52400
--- /dev/null
+++ b/lib/lib_strtoll.c
@@ -0,0 +1,105 @@
+/****************************************************************************
+ * lib_strtoll.c
+ *
+ *   Copyright (C) 2009 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 <stdlib.h>
+#include "lib_internal.h"
+
+#ifdef CONFIG_HAVE_LONG_LONG
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: strtoll
+ *
+ * Description:
+ *   The  strtol() function  converts  the initial part of the string in
+ *   nptr to a long long integer value according to the given base, which
+ *   must be between 2 and 36 inclusive, or be the special value 0.
+ *
+ * Warning: does not check for integer overflow!
+ *
+ ****************************************************************************/
+ 
+long long strtoll(const char *nptr, char **endptr, int base)
+{
+  unsigned long long accum = 0;
+  boolean negate = FALSE;
+
+  if (nptr)
+    {
+      /* Skip leading spaces */
+
+      lib_skipspace(&nptr);
+
+      /* Check for leading + or - */
+
+      if (*nptr == '-')
+        {
+          negate = TRUE;
+          nptr++;
+        }
+      else if (*nptr == '+')
+        {
+          nptr++;
+        }
+
+      /* Get the unsigned value */
+
+      accum = strtoull(nptr, endptr, base);
+
+      /* Correct the sign of the result */
+
+      if (negate)
+        {
+          return -(long long)accum;
+        }
+    }
+  return (long long)accum;
+}
+
+#endif
+
diff --git a/lib/lib_strtoul.c b/lib/lib_strtoul.c
new file mode 100644
index 0000000000000000000000000000000000000000..6479d60c16ae449e3ce38e2ae9bbb567fde2150e
--- /dev/null
+++ b/lib/lib_strtoul.c
@@ -0,0 +1,97 @@
+/****************************************************************************
+ * lib/lib_strtoul.c
+ *
+ *   Copyright (C) 2007, 2009 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 <stdlib.h>
+#include "lib_internal.h"
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: strtoul
+ *
+ * Description:
+ *   The  strtol() function  converts  the initial part of the string in
+ *   nptr to a long unsigned integer value according to the given base, which
+ *   must be between 2 and 36 inclusive, or be the special value 0.
+ *
+ * Warning: does not check for integer overflow!
+ *
+ ****************************************************************************/
+ 
+unsigned long strtoul(const char *nptr, char **endptr, int base)
+{
+  unsigned long accum = 0;
+  int value;
+
+  if (nptr)
+    {
+      /* Skip leading spaces */
+
+      lib_skipspace(&nptr);
+
+      /* Check for unspecified base */
+
+      base = lib_checkbase(base, &nptr);
+
+      /* Accumulate each "digit" */
+
+      while (lib_isbasedigit(*nptr, base, &value))
+        {
+            accum = accum*base + value;
+            nptr++;
+        }
+
+      /* Return the final pointer to the unused value */
+
+      if (endptr)
+        {
+          *endptr = (char *)nptr;
+        }
+    }
+   return accum;
+}
+
diff --git a/lib/lib_strtoull.c b/lib/lib_strtoull.c
new file mode 100644
index 0000000000000000000000000000000000000000..2a135b3c872b967d910cfa2f266a08936b0f8248
--- /dev/null
+++ b/lib/lib_strtoull.c
@@ -0,0 +1,99 @@
+/****************************************************************************
+ * lib/lib_strtoull.c
+ *
+ *   Copyright (C) 2009 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 <nuttx/compiler.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include "lib_internal.h"
+
+#ifdef CONFIG_HAVE_LONG_LONG
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: strtoull
+ *
+ * Description:
+ *   The  strtol() function  converts  the initial part of the string in
+ *   nptr to a long unsigned integer value according to the given base, which
+ *   must be between 2 and 36 inclusive, or be the special value 0.
+ *
+ ****************************************************************************/
+ 
+unsigned long long strtoull(const char *nptr, char **endptr, int base)
+{
+  unsigned long long accum = 0;
+  int value;
+
+  if (nptr)
+    {
+      /* Skip leading spaces */
+
+      lib_skipspace(&nptr);
+
+      /* Check for unspecified base */
+
+      base = lib_checkbase(base, &nptr);
+
+      /* Accumulate each "digit" */
+
+      while (lib_isbasedigit(*nptr, base, &value))
+        {
+            accum = accum*base + value;
+            nptr++;
+        }
+
+      /* Return the final pointer to the unused value */
+
+      if (endptr)
+        {
+          *endptr = (char *)nptr;
+        }
+    }
+   return accum;
+}
+#endif
+