Index: XML-Bare-0.53/parser.c =================================================================== --- XML-Bare-0.53.orig/parser.c +++ XML-Bare-0.53/parser.c @@ -1,8 +1,6 @@ #include "parser.h" #include -#ifdef DARWIN - #include "stdlib.h" -#endif +#include "stdlib.h" #ifdef NOSTRING void memset(char *s, int c, int n) { char *se = s + n; @@ -419,7 +417,7 @@ int parserc_parse( struct parserc *self, case 0: last_state = ST_att_name; goto done; case '/': // self closing !! /> is assumed !! curatt = nodec_addattr( curnode, attname, attname_len ); - if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; } + if( !att_has_val ) { curatt->value = (char*)-1; curatt->vallen = 0; } attname_len = 0; curnode->z = cpos+1-xmlin; @@ -438,7 +436,7 @@ int parserc_parse( struct parserc *self, goto att_space; case '>': curatt = nodec_addattr( curnode, attname, attname_len ); - if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; } + if( !att_has_val ) { curatt->value = (char*)-1; curatt->vallen = 0; } attname_len = 0; cpos++; goto val_1; @@ -834,7 +832,7 @@ int parserc_parse_unsafely( struct parse switch( let ) { case '/': // self closing !! /> is assumed !! curatt = nodec_addattr( curnode, attname, attname_len ); - if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; } + if( !att_has_val ) { curatt->value = (char*)-1; curatt->vallen = 0; } attname_len = 0; curnode = curnode->parent; @@ -852,7 +850,7 @@ int parserc_parse_unsafely( struct parse goto u_att_space; case '>': curatt = nodec_addattr( curnode, attname, attname_len ); - if( !att_has_val ) { curatt->value = -1; curatt->vallen = 0; } + if( !att_has_val ) { curatt->value = (char*)-1; curatt->vallen = 0; } attname_len = 0; cpos++; goto u_val_1;