Skip to content
Snippets Groups Projects
Commit 2c69bf69 authored by Mathieu Malaterre's avatar Mathieu Malaterre
Browse files

COMP: missing string.h header for strlen.

parent a38aca3c
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,8 @@
# include "kwsys_ios_iostream.h.in"
#endif
#include <string.h> /* strlen */
int testIOS(int, char*[])
{
kwsys_ios::ostringstream ostr;
......@@ -24,7 +26,7 @@ int testIOS(int, char*[])
}
const char world[] = "world";
kwsys_ios::ostringstream ostr2;
ostr2.write( hello, strlen(hello) );
ostr2.write( hello, strlen(hello) ); /* I could do sizeof */
ostr2.put( '\0' );
ostr2.write( world, strlen(world) );
if(ostr2.str().size() != strlen(hello) + 1 + strlen(world) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment