public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/4328] struct stat is bogus when __USE_FILE_OFFSET64 is defined
Date: Fri, 06 Apr 2007 08:52:00 -0000	[thread overview]
Message-ID: <20070406085246.28084.qmail@sourceware.org> (raw)
In-Reply-To: <20070406094051.4328.bazsi@balabit.hu>


------- Additional Comments From jakub at redhat dot com  2007-04-06 09:52 -------
Then the bug is Ubuntu specific.
(gdb) p (char *)&st64.st_size - (char *)&st64
$1 = 44
(gdb) p (char *)&st.st_size - (char *)&st
$2 = 44

and
#define _GNU_SOURCE
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <stddef.h>
#include <stdio.h>

int
main (void)
{
  printf ("%zd\n", (size_t) offsetof (struct stat, st_size));
  printf ("%zd\n", (size_t) offsetof (struct stat64, st_size));
  return 0;
}

prints 44 twice for 32-bit binaries (both on x86_64 -m32 and on i?86 only),
48 for 64-bit binaries.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=4328

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  reply	other threads:[~2007-04-06  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-06  8:41 [Bug libc/4328] New: " bazsi at balabit dot hu
2007-04-06  8:52 ` jakub at redhat dot com [this message]
2007-04-06  9:38 ` [Bug libc/4328] " bazsi at balabit dot hu
2007-04-06  9:54 ` bazsi at balabit dot hu

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=20070406085246.28084.qmail@sourceware.org \
    --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: link
Be 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).