Changeset 8a5a902 in mainline for uspace/lib/posix


Ignore:
Timestamp:
2013-03-29T16:26:39Z (13 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/posix/include/posix/string.h

    r2d1195c0 r8a5a902  
    6060 * forward declarations ought to be enough.
    6161 */
     62
    6263/* From str.h. */
    63 extern char * strtok_r(char *, const char *, char **);
    64 extern char * strtok(char *, const char *);
     64
     65extern char *strtok_r(char *, const char *, char **);
     66extern char *strtok(char *, const char *);
    6567
    6668/* From mem.h */
     69
     70#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
     71#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
     72
    6773#define bzero(ptr, len)  memset((ptr), 0, (len))
    68 extern void *memset(void *, int, size_t);
    69 extern void *memcpy(void *, const void *, size_t);
     74
    7075extern void *memmove(void *, const void *, size_t);
    71 
     76extern int bcmp(const void *, const void *, size_t);
    7277
    7378/* Copying and Concatenation */
Note: See TracChangeset for help on using the changeset viewer.