[openfirmware] [commit] r2286 - in clients/lib: . arm
repository service
svn at openfirmware.info
Wed Jun 15 23:00:09 CEST 2011
Author: wmb
Date: Wed Jun 15 23:00:08 2011
New Revision: 2286
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2286
Log:
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.
Modified:
clients/lib/arm/makefile
clients/lib/mem.c
clients/lib/strings.c
clients/lib/types.h
Modified: clients/lib/arm/makefile
==============================================================================
--- clients/lib/arm/makefile Wed Jun 15 22:38:20 2011 (r2285)
+++ clients/lib/arm/makefile Wed Jun 15 23:00:08 2011 (r2286)
@@ -13,7 +13,7 @@
CC := gcc
endif
-CFLAGS = -I.. -O2 -mcpu=strongarm110
+CFLAGS = -I.. -O2 -mcpu=strongarm110 -fno-builtin
ifeq (y, $(shell $(CC) -xc -c -fno-stack-protector /dev/null -o /dev/null 2>/dev/null && echo y))
CFLAGS += -fno-stack-protector
endif
Modified: clients/lib/mem.c
==============================================================================
--- clients/lib/mem.c Wed Jun 15 22:38:20 2011 (r2285)
+++ clients/lib/mem.c Wed Jun 15 23:00:08 2011 (r2286)
@@ -3,14 +3,14 @@
#include "1275.h"
VOID
-memcpy(char *to, char *from, size_t len)
+memcpy(char *to, char *from, int len)
{
while (len--)
*to++ = *from++;
}
VOID
-memset(char *cp, int c, size_t len)
+memset(char *cp, int c, int len)
{
while (len--)
*(cp + len) = c;
Modified: clients/lib/strings.c
==============================================================================
--- clients/lib/strings.c Wed Jun 15 22:38:20 2011 (r2285)
+++ clients/lib/strings.c Wed Jun 15 23:00:08 2011 (r2286)
@@ -16,7 +16,7 @@
}
int
-strncmp(const char *s, const char *t, size_t len)
+strncmp(const char *s, const char *t, int len)
{
int i;
@@ -28,24 +28,24 @@
return((int) (s[i] - t[i]));
}
-size_t
+int
strlen(const char *s)
{
int i;
for (i = 0; s[i] != '\0'; ++i)
;
- return((size_t) i);
+ return((int) i);
}
-size_t
-strnlen(const char *s, size_t maxlen)
+int
+strnlen(const char *s, int maxlen)
{
int i;
for (i = 0; i < maxlen && s[i] != '\0'; ++i)
;
- return((size_t) i);
+ return((int) i);
}
char *
@@ -114,9 +114,9 @@
return(temp);
}
-void *memchr(const void *s, int c, int len)
+const void *memchr(const void *s, int c, int len)
{
- unsigned char *p = s;
+ const unsigned char *p = s;
while (len--) {
if (*p == (unsigned char)c)
return p;
Modified: clients/lib/types.h
==============================================================================
--- clients/lib/types.h Wed Jun 15 22:38:20 2011 (r2285)
+++ clients/lib/types.h Wed Jun 15 23:00:08 2011 (r2286)
@@ -5,6 +5,4 @@
#define LONG long
#define NULL 0
-typedef unsigned int size_t;
-
VOID fatal(char *fmt, ...);
More information about the openfirmware
mailing list