public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
@ 2005-11-14 20:38 tsv at solvo dot ru
2005-11-15 15:05 ` [Bug libc/1864] " tsv at solvo dot ru
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: tsv at solvo dot ru @ 2005-11-14 20:38 UTC (permalink / raw)
To: glibc-bugs
GNU C Library development release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.1 20050727 (Red Hat 4.0.1-5).
Compiled on a Linux 2.4.20 system on 2005-11-01.
The following test program shows invalid behavior:
#include <sys/statvfs.h>
#include <stdio.h>
void print(struct statvfs value)
{
printf("%ld\n", (long)value.f_bavail);
}
int main(int argc, char*argv[])
{
struct statvfs st;
if(argc!=2){
printf("usage: checkstat <path>\n");
return 1;
}
statvfs(argv[1], &st);
print(st);
}
falk@juist:/tmp% df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 127383 88516 32290 74% /
falk@juist:/tmp% gcc test.c && ./a.out /
32290
falk@juist:/tmp% gcc -D_FILE_OFFSET_BITS=64 test.c && ./a.out /
116483808061937
The problem seems to be that ./sysdeps/unix/sysv/linux/alpha/bits/typesizes.h is
different from ./sysdeps/generic/bits/typesizes.h and defines
__FSBLKCNT_T_TYPE, __FSBLKCNT64_T_TYPE, __FSFILCNT_T_TYPE, __FSFILCNT64_T_TYPE
macros as 32 and 64 bits. I guess the glibc is build with 32 bits
(__FSBLKCNT_T_TYPE, __FSFILCNT_T_TYPE) by default.
What is the correct way to fix it? To define above macros the same way as it is
done in generic version?
Thank you
--
Summary: bad struct statvfs declaration on Alpha when
_FILE_OFFSET_BITS is defined
Product: glibc
Version: 2.3.5
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: tsv at solvo dot ru
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: alpha-unknown-linux
GCC host triplet: alpha-unknown-linux
GCC target triplet: alpha-unknown-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
@ 2005-11-15 15:05 ` tsv at solvo dot ru
2005-11-16 20:04 ` drepper at redhat dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: tsv at solvo dot ru @ 2005-11-15 15:05 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From tsv at solvo dot ru 2005-11-15 15:05 -------
It seems that in 1999 there was change that converted __FSBLKCNT_T_TYPE,
__FSFILCNT_T_TYPE from 64 bits to 32 bits for alpha. So the question is how it
should work with _FILE_OFFSET_BITS defined.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
2005-11-15 15:05 ` [Bug libc/1864] " tsv at solvo dot ru
@ 2005-11-16 20:04 ` drepper at redhat dot com
2005-11-29 9:29 ` stefaan dot deroeck at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2005-11-16 20:04 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|drepper at redhat dot com |rth at gcc dot gnu dot org
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
2005-11-15 15:05 ` [Bug libc/1864] " tsv at solvo dot ru
2005-11-16 20:04 ` drepper at redhat dot com
@ 2005-11-29 9:29 ` stefaan dot deroeck at gmail dot com
2006-03-13 18:51 ` vapier at gentoo dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: stefaan dot deroeck at gmail dot com @ 2005-11-29 9:29 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From stefaan dot deroeck at gmail dot com 2005-11-29 09:29 -------
Encountered the same problem when trying to run net-snmp (daemon) on alpha
(latest gentoo stable). Worked around it by hacking into typesizes.h (yes, very
dirty). A clean fix would be really nice.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefaan dot deroeck at gmail
| |dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
` (2 preceding siblings ...)
2005-11-29 9:29 ` stefaan dot deroeck at gmail dot com
@ 2006-03-13 18:51 ` vapier at gentoo dot org
2008-08-12 2:31 ` samuel dot thibault at ens-lyon dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2006-03-13 18:51 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |vapier at gentoo dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
` (3 preceding siblings ...)
2006-03-13 18:51 ` vapier at gentoo dot org
@ 2008-08-12 2:31 ` samuel dot thibault at ens-lyon dot org
2008-08-12 2:32 ` samuel dot thibault at ens-lyon dot org
2008-11-26 23:28 ` [Bug ports/1864] " drepper at redhat dot com
6 siblings, 0 replies; 10+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2008-08-12 2:31 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From samuel dot thibault at ens-lyon dot org 2008-08-12 02:30 -------
Mmm, looking at kernel source, it looks likes alpha is indeed the only 64bit arch that has a 32bit stat/statfs interface (probably because that's the oldest one). And although work has been done to expose a 64bit interface to userland for stat, it wasn't for statfs, and applications have been compiled with a dual 32/64bit interface. Could you try the attached patch?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |samuel dot thibault at ens-
| |lyon dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
` (4 preceding siblings ...)
2008-08-12 2:31 ` samuel dot thibault at ens-lyon dot org
@ 2008-08-12 2:32 ` samuel dot thibault at ens-lyon dot org
2008-11-26 23:28 ` [Bug ports/1864] " drepper at redhat dot com
6 siblings, 0 replies; 10+ messages in thread
From: samuel dot thibault at ens-lyon dot org @ 2008-08-12 2:32 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From samuel dot thibault at ens-lyon dot org 2008-08-12 02:31 -------
Created an attachment (id=2903)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2903&action=view)
make alpha use a dual 32/64bit interface for *stat*fs*
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ports/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
` (5 preceding siblings ...)
2008-08-12 2:32 ` samuel dot thibault at ens-lyon dot org
@ 2008-11-26 23:28 ` drepper at redhat dot com
6 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2008-11-26 23:28 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2008-11-26 23:27 -------
Alpha is not in the main tree anymore since we have no maintainer. Somebody has
to step up and volunteer to be the maintainer of the alpha ports tree or nothing
will happen.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|rth at gcc dot gnu dot org |roland at gnu dot org
Status|ASSIGNED |NEW
Component|libc |ports
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ports/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
[not found] <bug-1864-131@http.sourceware.org/bugzilla/>
2012-02-15 17:46 ` jsm28 at gcc dot gnu.org
@ 2012-02-15 18:17 ` rth at gcc dot gnu.org
1 sibling, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu.org @ 2012-02-15 18:17 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |rth at gcc dot gnu.org
Resolution| |FIXED
--- Comment #6 from Richard Henderson <rth at gcc dot gnu.org> 2012-02-15 18:16:37 UTC ---
This has been fixed since
commit 7ffd2bd725c3e4d77e6bfe36b76500d20427929d
Author: Richard Henderson <rth@twiddle.net>
Date: Wed May 5 08:12:11 2010 -0700
alpha: Do the 32/64-bit split on statfs routines.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ports/1864] bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined
[not found] <bug-1864-131@http.sourceware.org/bugzilla/>
@ 2012-02-15 17:46 ` jsm28 at gcc dot gnu.org
2012-02-15 18:17 ` rth at gcc dot gnu.org
1 sibling, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-02-15 17:46 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=1864
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at sourceware dot org
AssignedTo|roland at gnu dot org |unassigned at sourceware
| |dot org
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-02-15 18:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-14 20:38 [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined tsv at solvo dot ru
2005-11-15 15:05 ` [Bug libc/1864] " tsv at solvo dot ru
2005-11-16 20:04 ` drepper at redhat dot com
2005-11-29 9:29 ` stefaan dot deroeck at gmail dot com
2006-03-13 18:51 ` vapier at gentoo dot org
2008-08-12 2:31 ` samuel dot thibault at ens-lyon dot org
2008-08-12 2:32 ` samuel dot thibault at ens-lyon dot org
2008-11-26 23:28 ` [Bug ports/1864] " drepper at redhat dot com
[not found] <bug-1864-131@http.sourceware.org/bugzilla/>
2012-02-15 17:46 ` jsm28 at gcc dot gnu.org
2012-02-15 18:17 ` rth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).