[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
64-bit bug in ftw.c
From: |
Jim Meyering |
Subject: |
64-bit bug in ftw.c |
Date: |
Thu, 06 Mar 2003 15:09:02 +0100 |
This patch probably fixes the bug that is causing coredumps in the
coreutils-4.5.9 tests of `du' when it is built on HP-UX 11.22 on an
IPF ia64 hp workstation zx2000 in 64-bit mode. Thanks to Bob Proulx
for reporting the failure.
2003-03-06 Jim Meyering <address@hidden>
* io/ftw.c (ftw_startup): Declare `func' parameter to be of type
NFTW_FUNC_T, not void* which may be smaller on 64-bit systems.
Remove now-unnecessary cast.
(FTW_NAME): Cast func argument to type `NFTW_FUNC_T'.
Index: io/ftw.c
===================================================================
RCS file: /cvs/glibc/libc/io/ftw.c,v
retrieving revision 1.42
diff -u -p -u -p -r1.42 ftw.c
--- io/ftw.c 8 Feb 2003 18:27:13 -0000 1.42
+++ io/ftw.c 6 Mar 2003 13:01:23 -0000
@@ -570,7 +570,7 @@ ftw_dir (struct ftw_data *data, struct S
static int
internal_function
-ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
+ftw_startup (const char *dir, int is_nftw, NFTW_FUNC_T func, int descriptors,
int flags)
{
struct ftw_data data;
@@ -619,7 +621,7 @@ ftw_startup (const char *dir, int is_nft
every case the callback using the format of the `nftw' version
and get the correct result since the stack layout for a function
call in C allows this. */
- data.func = (NFTW_FUNC_T) func;
+ data.func = func;
/* Since we internally use the complete set of FTW_* values we need
to reduce the value range before calling a `ftw' callback. */
@@ -728,7 +730,7 @@ FTW_NAME (path, func, descriptors)
FTW_FUNC_T func;
int descriptors;
{
- return ftw_startup (path, 0, func, descriptors, 0);
+ return ftw_startup (path, 0, (NFTW_FUNC_T) func, descriptors, 0);
}
int
- 64-bit bug in ftw.c,
Jim Meyering <=