public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tsv at solvo dot ru" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/1864] New: bad struct statvfs declaration on Alpha when _FILE_OFFSET_BITS is defined Date: Mon, 14 Nov 2005 20:38:00 -0000 [thread overview] Message-ID: <20051114203814.1864.tsv@solvo.ru> (raw) 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.
next reply other threads:[~2005-11-14 20:38 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-11-14 20:38 tsv at solvo dot ru [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20051114203814.1864.tsv@solvo.ru \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).