2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>

* libmisc/shell/fts.c: Cast to uintptr_t instead of long for better
	16bit target compliance.
This commit is contained in:
Ralf Corsepius
2010-05-22 16:48:41 +00:00
parent eb5cd5b8b9
commit 2ad5753419
2 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/fts.c: Cast to uintptr_t instead of long for better
16bit target compliance.
2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libfs/src/rfs/rtems-rfs-bitmaps-ut.c: Use "16 bit int" arg
in call to srand if "32 bit int" doesn't fit into "int".

View File

@@ -59,6 +59,7 @@ __RCSID("$NetBSD: fts.c,v 1.40 2009/11/02 17:17:34 stacktic Exp $");
#include <fcntl.h>
#include <fts.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
@@ -1055,7 +1056,7 @@ fts_alloc(FTS *sp, const char *name, size_t namelen)
if (!ISSET(FTS_NOSTAT))
p->fts_statp = (__fts_stat_t *)ALIGN(
(unsigned long)(p->fts_name + namelen + 2));
(uintptr_t)(p->fts_name + namelen + 2));
#else
if ((p = malloc(sizeof(FTSENT) + namelen)) == NULL)
return (NULL);