> On Fri, Jan 16, 2009 at 01:33:38PM +0200, Danny Braniss wrote:
> > some facts:
> > #include <stdio.h>
> > int
> > main()
> > {
> >      printf("%s\n", strerror(2));
> >      return 0;
> > }
> > 
> >     1- it works fine on i386
> >     2- it bombs on amd64
> >     3- with a local strerror.c (instead of the one in libc)
> >        works fine
> > so, there is something realy wrong going on here!
> > (and it gows back to at least 7.0-stable)
> 
> The compiler thinks strerror returns an int.  Include <string.h>.

ahh, RTFM ALL THE WAY! I just saw the top few lines:
LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <stdio.h>


but later it shows:
     #include <string.h>

     char *
     strerror(int errnum);

on the other hand, compiling with -static workes ok, which sent me on
the wrong trail.

danny


_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to