summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-02-24 16:13:11 -0800
committerH. Peter Anvin <hpa@zytor.com>2011-02-24 16:13:11 -0800
commitb507068d4788084347aa3860743dcaa57e49136a (patch)
treec822a92b8358918756ce4b210e8b28fe7981d497
parent1207d0f56a28e628f66a65ca8aef16cf62fb6d07 (diff)
downloadsyslinux-b507068d4788084347aa3860743dcaa57e49136a.tar.gz
skipspace: move out of linesyslinux-4.04-pre9
Move skipspace() out of line since it triggers inlining warnings. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/include/ctype.h9
-rw-r--r--com32/lib/Makefile1
-rw-r--r--com32/lib/skipspace.c8
3 files changed, 12 insertions, 6 deletions
diff --git a/com32/include/ctype.h b/com32/include/ctype.h
index 7709c037..83bbda1c 100644
--- a/com32/include/ctype.h
+++ b/com32/include/ctype.h
@@ -7,6 +7,8 @@
#ifndef _CTYPE_H
#define _CTYPE_H
+#include <klibc/extern.h>
+
#ifndef __CTYPE_NO_INLINE
# define __ctype_inline static __inline__
#else
@@ -114,11 +116,6 @@ __ctype_inline int tolower(int __c)
return isupper(__c) ? _tolower(__c) : __c;
}
-__ctype_inline char *skipspace(const char *p)
-{
- while (isspace((unsigned char)*p))
- p++;
- return (char *)p;
-}
+__extern char *skipspace(const char *p);
#endif /* _CTYPE_H */
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 2035df22..7bfc0dbf 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -27,6 +27,7 @@ LIBOBJS = \
strtoumax.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o \
asprintf.o vasprintf.o strlcpy.o strlcat.o \
vsscanf.o zalloc.o \
+ skipspace.o \
\
lmalloc.o lstrdup.o \
\
diff --git a/com32/lib/skipspace.c b/com32/lib/skipspace.c
new file mode 100644
index 00000000..5db26519
--- /dev/null
+++ b/com32/lib/skipspace.c
@@ -0,0 +1,8 @@
+#include <ctype.h>
+
+char *skipspace(const char *p)
+{
+ while (isspace((unsigned char)*p))
+ p++;
+ return (char *)p;
+}