diff --git a/configs/z80sim/README.txt b/configs/z80sim/README.txt index 45eb1d3109..53d94f4b7d 100644 --- a/configs/z80sim/README.txt +++ b/configs/z80sim/README.txt @@ -88,7 +88,7 @@ Configuring NuttX cd tools ./configure.sh z80sim/pashello 2) Set the PATH environment variable to include the path to the SDCC - toolchain. + toolchain binaries. NOTES: @@ -171,9 +171,14 @@ compatible with this build. First start with the usual steps cd sdcc ./configure +Note if you do not have the gputils packet installed, newer version of the +SDCC configure will fail. You will have to either install the gputils +package or if you don't need PIC14 or PIC16 support: + + ./configure --disable-pic14-port --disable-pic16-port + Then make the SDCC binaries - cd sdcc make and install SDCC: diff --git a/include/crc64.h b/include/crc64.h index e08183327a..80c7ae10f5 100644 --- a/include/crc64.h +++ b/include/crc64.h @@ -40,9 +40,13 @@ * Included Files ****************************************************************************/ +#include + #include #include +#ifdef CONFIG_HAVE_LONG_LONG + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -102,4 +106,5 @@ uint64_t crc64(FAR const uint8_t *src, size_t len); } #endif +#endif /* CONFIG_HAVE_LONG_LONG */ #endif /* __INCLUDE_CRC64_H */ diff --git a/include/cxx/cwchar b/include/cxx/cwchar index 4b60226de7..fa70b9d53b 100755 --- a/include/cxx/cwchar +++ b/include/cxx/cwchar @@ -40,6 +40,8 @@ // Included Files //*************************************************************************** +#include + #include #include @@ -112,10 +114,15 @@ namespace std using ::wcsrtombs; using ::wcsspn; using ::wcsstr; +#ifdef CONFIG_HAVE_DOUBLE using ::wcstod; +#endif using ::wcstof; using ::wcstok; using ::wcstol; +#ifdef CONFIG_HAVE_LONG_DOUBLE + using ::wcstold; +#endif using ::wcstoll; using ::wcstoul; using ::wcstoull; diff --git a/include/wchar.h b/include/wchar.h index 0a891598d3..52cde9f306 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/wchar.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -218,11 +218,15 @@ size_t wcsrtombs(FAR char *, FAR const wchar_t **, size_t, FAR mbstate_t *); size_t wcsspn(FAR const wchar_t *, FAR const wchar_t *); FAR wchar_t *wcsstr(FAR const wchar_t *, FAR const wchar_t *); +#ifdef CONFIG_HAVE_DOUBLE double wcstod(FAR const wchar_t *, FAR wchar_t **); +#endif float wcstof(FAR const wchar_t *, FAR wchar_t **); FAR wchar_t *wcstok(FAR wchar_t *, FAR const wchar_t *, FAR wchar_t **); long int wcstol(FAR const wchar_t *, FAR wchar_t **, int); +#ifdef CONFIG_HAVE_LONG_DOUBLE long double wcstold(FAR const wchar_t *, FAR wchar_t **); +#endif long long int wcstoll(FAR const wchar_t *, FAR wchar_t **, int); unsigned long int wcstoul(FAR const wchar_t *, FAR wchar_t **, int); unsigned long long int wcstoull(FAR const wchar_t *, FAR wchar_t **, int); diff --git a/libc/inttypes/lib_strtoimax.c b/libc/inttypes/lib_strtoimax.c index 2862e7f8eb..0acaca3155 100644 --- a/libc/inttypes/lib_strtoimax.c +++ b/libc/inttypes/lib_strtoimax.c @@ -40,11 +40,18 @@ #include #include +#include #include #include #include "libc.h" +/* Current implementation depends on strtoull() and, hence, is only + * available if long long types are supported. + */ + +#ifdef CONFIG_HAVE_LONG_LONG + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -53,7 +60,7 @@ * Name: strtoimax * * Description: - * The strtoimax() function converts the initial part of the string in + * The strtoimax() function converts the initial part of the string in * nptr to a intmax_t integer value according to the given base, which * must be between 2 and 36 inclusive, or be the special value 0. * @@ -118,3 +125,5 @@ intmax_t strtoimax(FAR const char *nptr, FAR char **endptr, int base) return (intmax_t)accum; } + +#endif /* CONFIG_HAVE_LONG_LONG */ diff --git a/libc/misc/lib_crc64.c b/libc/misc/lib_crc64.c index 8faf0193d1..493551d259 100644 --- a/libc/misc/lib_crc64.c +++ b/libc/misc/lib_crc64.c @@ -43,6 +43,8 @@ #include #include +#ifdef CONFIG_HAVE_LONG_LONG + /**************************************************************************** * Private Data ****************************************************************************/ @@ -299,3 +301,5 @@ uint64_t crc64(FAR const uint8_t *src, size_t len) { return crc64part(src, len, CRC64_INIT) ^ CRC64_XOROUT; } + +#endif /* CONFIG_HAVE_LONG_LONG */ diff --git a/libc/stdlib/lib_strtoul.c b/libc/stdlib/lib_strtoul.c index 1dec49e146..8828aa830c 100644 --- a/libc/stdlib/lib_strtoul.c +++ b/libc/stdlib/lib_strtoul.c @@ -1,7 +1,7 @@ /**************************************************************************** * /libc/stdlib/lib_strtoul.c * - * Copyright (C) 2007, 2009, 2011, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011, 2016-2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -109,7 +109,7 @@ unsigned long strtoul(FAR const char *nptr, FAR char **endptr, int base) if (endptr) { - *endptr = (char *)nptr; + *endptr = (FAR char *)nptr; } } diff --git a/libc/time/lib_difftime.c b/libc/time/lib_difftime.c index 42bd374307..ba249d230a 100644 --- a/libc/time/lib_difftime.c +++ b/libc/time/lib_difftime.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/time/lib_difftime.c * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. * Author: Sebastien Lorquet * * Redistribution and use in source and binary forms, with or without @@ -72,7 +72,7 @@ float difftime(time_t time1, time_t time0) * differences!) */ - return (float)((uint32_t)(time1 - time0)) + return (float)((uint32_t)(time1 - time0)); } else { @@ -80,7 +80,7 @@ float difftime(time_t time1, time_t time0) * might not be set? */ - return (float)((int32_t)(time1 - time0)) + return (float)((int32_t)(time1 - time0)); } } #endif