https://bugzilla.novell.com/show_bug.cgi?id=464365
Summary: memccpy not available in c99
Product: openSUSE 11.1
Version: Final
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
AssignedTo: pth@novell.com
ReportedBy: mmj@mmj.dk
QAContact: qa@suse.de
Found By: Third Party Developer/Partner
memccpy(3) says:
#include
[...]
CONFORMING TO
SVr4, 4.3BSD, C99.
But /usr/include/string.h:
#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. */
Resulting in a program utilizing memccpy compiled with -std=c99 will barf:
$ 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;
}
$ gcc -std=c99 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
Which then again results in building of packages fail.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.