diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-13 22:04:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-13 22:04:47 +0000 |
commit | bf8d0c68312793631ed4ade1541ec36168b3722b (patch) | |
tree | b7b479778114a18c40f6fc2b874664cc61f7241a /nuttx/lib | |
parent | 4f2e6ddbe763fd020cf82c5e1e555cba8cb7246a (diff) | |
download | px4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.tar.gz px4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.tar.bz2 px4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.zip |
Fixes for z80 compilation with SDCC toolchain. There are still a few header file and linker issues
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5149 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r-- | nuttx/lib/stdio/lib_lowinstream.c | 4 | ||||
-rw-r--r-- | nuttx/lib/stdio/lib_sscanf.c | 10 | ||||
-rw-r--r-- | nuttx/lib/string/Make.defs | 18 |
3 files changed, 18 insertions, 14 deletions
diff --git a/nuttx/lib/stdio/lib_lowinstream.c b/nuttx/lib/stdio/lib_lowinstream.c index c97a4721f..499a647ea 100644 --- a/nuttx/lib/stdio/lib_lowinstream.c +++ b/nuttx/lib/stdio/lib_lowinstream.c @@ -39,8 +39,6 @@ #include <nuttx/config.h> -#ifdef CONFIG_ARCH_LOWGETC - #include <stdio.h> #include <assert.h> #include <errno.h> @@ -49,6 +47,8 @@ #include "lib_internal.h" +#ifdef CONFIG_ARCH_LOWGETC + /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/nuttx/lib/stdio/lib_sscanf.c b/nuttx/lib/stdio/lib_sscanf.c index c77907711..01c96c21d 100644 --- a/nuttx/lib/stdio/lib_sscanf.c +++ b/nuttx/lib/stdio/lib_sscanf.c @@ -91,13 +91,13 @@ static const char spaces[] = " \t\n\r\f\v"; * ****************************************************************************/ -int sscanf(const char *buf, const char *fmt, ...) +int sscanf(FAR const char *buf, FAR const char *fmt, ...) { va_list ap; int count; va_start(ap, fmt); - count = vsscanf((char*)buf, fmt, ap); + count = vsscanf((FAR char*)buf, fmt, ap); va_end(ap); return count; } @@ -109,15 +109,15 @@ int sscanf(const char *buf, const char *fmt, ...) * ANSI standard vsscanf implementation. * ****************************************************************************/ -int vsscanf(char *buf, const char *s, va_list ap) +int vsscanf(FAR char *buf, FAR const char *s, va_list ap) { int count; int noassign; int width; int base = 10; int lflag; - char *tv; - const char *tc; + FAR char *tv; + FAR const char *tc; char tmp[MAXLN]; lvdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, s); diff --git a/nuttx/lib/string/Make.defs b/nuttx/lib/string/Make.defs index 495634a9e..014623eef 100644 --- a/nuttx/lib/string/Make.defs +++ b/nuttx/lib/string/Make.defs @@ -36,13 +36,17 @@ # Add the string C files to the build CSRCS += lib_checkbase.c lib_isbasedigit.c lib_memset.c lib_memchr.c \ - lib_memccpy.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_strnlen.c \ - lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \ - lib_strndup.c lib_strcasestr.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_memccpy.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_strnlen.c \ + lib_strncasecmp.c lib_strncat.c lib_strncmp.c lib_strncpy.c \ + lib_strndup.c lib_strcasestr.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 + +ifeq ($(CONFIG_LIBC_FLOATINGPOINT),y) +CSRCS += lib_strtod.c +endif # Add the string directory to the build |