[syslinux:master] skipspace: move out of line

syslinux-bot for H. Peter Anvin hpa at zytor.com
Thu Feb 24 16:15:36 PST 2011


Commit-ID:  b507068d4788084347aa3860743dcaa57e49136a
Gitweb:     http://syslinux.zytor.com/commit/b507068d4788084347aa3860743dcaa57e49136a
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 24 Feb 2011 16:13:11 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 24 Feb 2011 16:13:11 -0800

skipspace: move out of line

Move skipspace() out of line since it triggers inlining warnings.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/include/ctype.h |    9 +++------
 com32/lib/Makefile    |    1 +
 com32/lib/skipspace.c |    8 ++++++++
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/com32/include/ctype.h b/com32/include/ctype.h
index 7709c03..83bbda1 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 2035df2..7bfc0db 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 0000000..5db2651
--- /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;
+}



More information about the Syslinux-commits mailing list