Mailinglist Archive: opensuse-bugs (13069 mails)

< Previous Next >
[Bug 464365] New: memccpy not available in c99
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 8 Jan 2009 02:15:17 -0700 (MST)
  • Message-id: <bug-464365-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>

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@xxxxxxxxxx
ReportedBy: mmj@xxxxxx
QAContact: qa@xxxxxxx
Found By: Third Party Developer/Partner

memccpy(3) says:

#include <strings.h>


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 <stdlib.h>
#include <string.h>

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:
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >