On Wed, Feb 18, 2009 at 8:39 AM, Julian Sikorski <belegdol@xxxxxxxxx> wrote: > man strchr says: > char *strchr(const char *s, int c); > > I don't see what is wrong since the argument is a const char* string. > > I can't reproduce the issue. May be the signature of strchr changed in > glibc? > Anyway, the above signature is not consistent since it returns a char* which > is a substring of a const char*. > If this is the case, there is a need for a test in configure to find which > signature version is available. > The manpages are out of date -- see Ulrich Drepper's post: http://markmail.org/message/e5y6atneqztuvpw6#query:+page:1+mid:hdkehz7bgl5b6vgc+state:results Called from C++, you have to do the following: - include <cstring> rather than <string.h> - if you pass in a const char *, the output should be stored in a const char * variable - otherwise, the output should be assigned to a char * variable HTH, -- miʃel salim • http://hircus.jaiku.com/ IUCS • msalim@xxxxxxxxxxxxxx Fedora • salimma@xxxxxxxxxxxxxxxxx MacPorts • hircus@xxxxxxxxxxxx -- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list