From: Grant Grundler <grundler@cup.hp.com>
To: Matthew Wilcox <Matthew.Wilcox@genedata.com>
Cc: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] getdents
Date: Wed, 03 Nov 1999 21:52:06 -0800 [thread overview]
Message-ID: <199911040552.VAA11478@milano.cup.hp.com> (raw)
In-Reply-To: Your message of "Thu, 04 Nov 1999 02:43:07 PST." <19991104024307.I25252@mencheca.ch.genedata.com>
Matthew Wilcox wrote:
...
> I've done the following:
>
> struct hpux_dirent {
> long d_off_pad; /* we only have a 32-bit off_t */
> long d_off;
> ino_t d_ino;
> short d_reclen;
> short d_namlen;
> char d_name[1];
> };
>
> I think that's the right way round to put the padding for a big-endian
> machine.
Mathew,
Sorry, it doesn't look right to me.
I not sure the following is "right" either but "looks more right":
#ifdef __LP64__
long d_off;
#else
int d_off_pad;
int d_off;
#endif
The problem is the offset for the d_off has to be different for
32-bit applications than it will be for 64-bit applications.
gcc has to behave the same way if we want binary compatibility.
In "wide-mode" HP-UX compiler uses 64-bit long/pointer and int
remains 32-bit. Ergo the name "LP64".
devresource.hp.com has a "HP-UX 64-bit Porting and Transition Guide,
June 1998" in the Document library. It's an interesting reference on
HP-UX kernel interacts with 32/64-bit binaries and has some interesting
gotchas.
hope this helps,
grant
Grant Grundler
Unix Developement Lab
+1.408.447.7253
next prev parent reply other threads:[~1999-11-04 5:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-03 2:11 [parisc-linux] getdents Matthew Wilcox
1999-11-04 1:12 ` Kevin Vajk
1999-11-04 1:29 ` Kevin Vajk
1999-11-04 1:43 ` Matthew Wilcox
1999-11-04 5:52 ` Grant Grundler [this message]
1999-11-04 1:39 ` Matthew Wilcox
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=199911040552.VAA11478@milano.cup.hp.com \
--to=grundler@cup.hp.com \
--cc=Matthew.Wilcox@genedata.com \
--cc=parisc-linux@thepuffingroup.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