Changeset 8a5a902 in mainline for uspace/lib/c/include/mem.h


Ignore:
Timestamp:
2013-03-29T16:26:39Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ca441c
Parents:
2d1195c0
Message:

GCC 4.8 recognizes parts of our C implementation of memset() and memcpy() and actually emits a call to memset() and memcpy()
(which is of course futile and only causes an infinite recursion)
switch to a hand-written memset() and memcpy()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/mem.h

    r2d1195c0 r8a5a902  
    3838#include <sys/types.h>
    3939
     40#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
     41#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
     42
    4043#define bzero(ptr, len)  memset((ptr), 0, (len))
    4144
    42 extern void *memset(void *, int, size_t);
    43 extern void *memcpy(void *, const void *, size_t);
    4445extern void *memmove(void *, const void *, size_t);
    45 
    4646extern int bcmp(const void *, const void *, size_t);
    4747
Note: See TracChangeset for help on using the changeset viewer.