Changeset 2286


Ignore:
Timestamp:
Jun 15, 2011, 9:00:08 PM (4 years ago)
Author:
wmb
Message:

client library - Use -fno-builtin to eliminate "conflicting type" warnings, and then eliminated the use of size_t in favor of "int", because size_t requires a dependency on external include files.

Location:
clients/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • clients/lib/arm/makefile

    r2273 r2286  
    1414endif
    1515
    16 CFLAGS = -I.. -O2 -mcpu=strongarm110
     16CFLAGS = -I.. -O2 -mcpu=strongarm110 -fno-builtin
    1717ifeq (y, $(shell $(CC) -xc -c -fno-stack-protector /dev/null -o /dev/null 2>/dev/null && echo y))
    1818  CFLAGS += -fno-stack-protector
  • clients/lib/mem.c

    r1 r2286  
    44
    55VOID
    6 memcpy(char *to, char *from, size_t len)
     6memcpy(char *to, char *from, int len)
    77{
    88        while (len--)
     
    1111
    1212VOID
    13 memset(char *cp, int c, size_t len)
     13memset(char *cp, int c, int len)
    1414{
    1515        while (len--)
  • clients/lib/strings.c

    r1767 r2286  
    1717
    1818int
    19 strncmp(const char *s, const char *t, size_t len)
     19strncmp(const char *s, const char *t, int len)
    2020{
    2121        int i;
     
    2929}
    3030
    31 size_t
     31int
    3232strlen(const char *s)
    3333{
     
    3636        for (i = 0; s[i] != '\0'; ++i)
    3737                ;
    38         return((size_t) i);
     38        return((int) i);
    3939}
    4040
    41 size_t
    42 strnlen(const char *s, size_t maxlen)
     41int
     42strnlen(const char *s, int maxlen)
    4343{
    4444        int i;
     
    4646        for (i = 0; i < maxlen && s[i] != '\0'; ++i)
    4747                ;
    48         return((size_t) i);
     48        return((int) i);
    4949}
    5050
     
    115115}
    116116
    117 void *memchr(const void *s, int c, int len)
     117const void *memchr(const void *s, int c, int len)
    118118{
    119         unsigned char *p = s;
     119        const unsigned char *p = s;
    120120        while (len--) {
    121121                if (*p == (unsigned char)c)
  • clients/lib/types.h

    r1 r2286  
    66#define NULL 0
    77
    8 typedef unsigned int size_t;
    9 
    108VOID fatal(char *fmt, ...);
Note: See TracChangeset for help on using the changeset viewer.