Index: ChangeLog from Benoît Perrot benoit@lrde.epita.fr
* configure.ac: Check isblank presence. * src/shell/shell.hh, src/shell/shell.cc: Provide isblank when the platform lack it.
2004-10-25 Benoît Perrot benoit@lrde.epita.fr
Index: src/shell/shell.hh --- src/shell/shell.hh (revision 142) +++ src/shell/shell.hh (revision 143) @@ -23,6 +23,8 @@ #ifndef SHELL_SHELL_HH # define SHELL_SHELL_HH
+# include "config.h" + # include <ctype.h>
# include <list> @@ -41,6 +43,10 @@ # include "vm/virtual_machine.hh" # include "shell/cmd.hh"
+# ifndef HAVE_ISBLANK +bool isblank(int c); +# endif // !HAVE_ISBLANK + namespace shell { /// Token word value. Index: src/shell/shell.cc --- src/shell/shell.cc (revision 142) +++ src/shell/shell.cc (revision 143) @@ -26,6 +26,14 @@ #include "shell/shell.hh" #include "shell/cmd.hh"
+#ifndef HAVE_ISBLANK +bool +isblank(int c) +{ + return (c == ' ' || c == '\t'); +} +#endif // !HAVE_ISBLANK + namespace shell {
Index: configure.ac --- configure.ac (revision 142) +++ configure.ac (revision 143) @@ -36,6 +36,10 @@ # Look for readline library. AC_CHECK_READLINE
+# Check presence of isblank +AC_CHECK_FUNCS(isblank) + + ## Development environment ------------- CXXFLAGS="${CXXFLAGS} -ansi -Wall -W -D__STDC_LIMIT_MACROS"