From: Daniel Jacobowitz <drow@false.org>
To: Kean Johnston <jkj@sco.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Guidance please: static or extern __inline__
Date: Thu, 28 Jul 2005 17:54:00 -0000 [thread overview]
Message-ID: <20050728175405.GA29635@nevyn.them.org> (raw)
In-Reply-To: <42E903E5.4040905@sco.com>
On Thu, Jul 28, 2005 at 09:12:21AM -0700, Kean Johnston wrote:
> to:
> extern int stat (const char *__p, stat_t *__s);
> extern __inline__ int
> stat(const char *__p, stat_t *__s)
> {
> return _xstat(_STAT_VER, __p, __s);
> }
...
> From reading teh docs it seems like 'extern __inline__' was
> the way to go for this type of header file trickery. However,
> it caused a problem bootstrapping the compiler, becuase the
> first stage doesn't have -O, so any calls to stat() actually
> go to the library routine called stat(), which is an old,
> deprecated stat that can't deal with, say, 32-bit inodes or
> uid_t's etc, and various programs like fixincludes then
> fail to stat files.
...
> However, I *think* I like the semantics of 'extern inline'
> better: use the inline version for the most part but if,
> for example, you take the address of the function, use the
> actual symbol stat(). But I see that most other fixincs
> use static inline.
Huh? This paragraph conflicts with the previous one I quoted. You
don't want extern inline, because you don't want the symbol stat() to
be called - that's your whole problem.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-07-28 17:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 16:12 Kean Johnston
2005-07-28 16:37 ` Gabriel Dos Reis
2005-07-28 17:49 ` Kean Johnston
2005-07-28 17:54 ` Daniel Jacobowitz [this message]
2005-07-28 18:32 ` Kean Johnston
2005-07-28 18:54 ` Daniel Jacobowitz
2005-07-28 19:05 ` Mike Stump
2005-07-28 19:43 ` Kean Johnston
2005-07-28 20:15 ` Gabriel Dos Reis
2005-07-28 20:33 ` Kean Johnston
2005-07-28 20:54 ` Mike Stump
2005-07-29 20:23 ` Kean Johnston
2005-07-29 21:18 ` Mike Stump
2005-07-29 22:03 ` Kean Johnston
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=20050728175405.GA29635@nevyn.them.org \
--to=drow@false.org \
--cc=gcc@gcc.gnu.org \
--cc=jkj@sco.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).