Merge branch '2.3'

This commit is contained in:
Petri Lehtinen 2012-03-22 09:02:51 +02:00
commit 17a51a4bf0

View File

@ -24,6 +24,8 @@
#include <fcntl.h> /* for _O_BINARY */
#endif
#define l_isspace(c) ((c) == ' ' || (c) == '\n' || (c) == '\r' || (c) == '\t')
static int getenv_int(const char *name)
{
char *value, *end;
@ -47,14 +49,14 @@ static const char *strip(char *str)
{
size_t length;
char *result = str;
while(*result && isspace(*result))
while(*result && l_isspace(*result))
result++;
length = strlen(result);
if(length == 0)
return result;
while(isspace(result[length - 1]))
while(l_isspace(result[length - 1]))
result[--length] = '\0';
return result;