On Thu, Jan 08, 2009 at 09:14:06AM +0100, Mads Martin Joergensen wrote:
Hello all,
Jump to memccpy(3) at the bottom. It says:
CONFORMING TO SVr4, 4.3BSD, C99.
Now look at the following program:
$ cat memccp.c #include
#include int main() { void *s, *d, *r;
s = malloc(1024); d = malloc(1024);
r = memccpy(s, d, 0, 1024);
return 0; }
And now compile it:
$ gcc -std=c99 -Wall memccp.c memccp.c: In function ‘main’: memccp.c:10: warning: implicit declaration of function ‘memccpy’ memccp.c:10: warning: assignment makes pointer from integer without a cast
Is this due to gcc not fully supporting C99? Would a possible solution be to remove the -std=c99 from the compile options, or would that bring other problems?
If the prototype does not appear, it might just be a glibc problem... C99 handling might have been forgotten here: #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)); #endif /* SVID. */ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org