9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 13:47 Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2002-10-09 13:47 UTC (permalink / raw)
  To: 9fans

> You probably want to compile with pcc rather than 8c.

The supplied mkfile for the version that was ported
to Plan9 (0.9.2) is set up to use 8c.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 17:05 Russ Cox
  0 siblings, 0 replies; 7+ messages in thread
From: Russ Cox @ 2002-10-09 17:05 UTC (permalink / raw)
  To: 9fans

> Thanks.  I am trying to compile Kaffe, which presumably compiled
> correctly under 3/ed.  Things have moved around a bit or it is my
> configuration.

You probably want to compile with pcc rather than 8c.

Russ



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 16:10 Charles Forsyth
  0 siblings, 0 replies; 7+ messages in thread
From: Charles Forsyth @ 2002-10-09 16:10 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

vfprintf etc don't take variable argument lists, but have one
parameter of type va_list that points to a variable argument list.  since you're
outside the APE environment (or it would be using /sys/include/ape/stdio.h)
you need to include <u.h> before <stdio.h>, as for nearly any
other Plan 9 include file (despite the comment to the contrary in
intro(2)).  in practice, you'll typically also need <libc.h> for any real program
(eg, to declare exits).

[-- Attachment #2: Type: message/rfc822, Size: 2092 bytes --]

From: "Skip Tavakkolian" <fst@centurytel.net>
To: 9fans@cse.psu.edu
Subject: [9fans] stdio.h va_list declarations
Date: Wed, 9 Oct 2002 08:08:17 -0400
Message-ID: <16d2a7daabbaf56b66e19efb07d17c32@centurytel.net>

I get:

/sys/include/stdio.h:79[temp.cp:405] mixed ansi/old function declaration: vfprintf
/sys/include/stdio.h:80[temp.cp:406] mixed ansi/old function declaration: vprintf
/sys/include/stdio.h:81[temp.cp:407] mixed ansi/old function declaration: vsprintf
/sys/include/stdio.h:82[temp.cp:408] mixed ansi/old function declaration: vsnprintf
/sys/include/stdio.h:83[temp.cp:409] mixed ansi/old function declaration: vfscanf

it is complaining about the use of va_list instead of '...' in the
prototype declaration.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 15:56 Russ Cox
  0 siblings, 0 replies; 7+ messages in thread
From: Russ Cox @ 2002-10-09 15:56 UTC (permalink / raw)
  To: 9fans

No it's not.  It's complaining that it has
no idea what a va_list is, so it thinks it's
a variable name.  Did you include u.h?

(Va_list and ... mean different things;
compare printf and vprintf.)

Russ


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 13:56 Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2002-10-09 13:56 UTC (permalink / raw)
  To: 9fans

> since you're
> outside the APE environment (or it would be using /sys/include/ape/stdio.h)
> you need to include <u.h> before <stdio.h>, as for nearly any
> other Plan 9 include file (despite the comment to the contrary in
> intro(2)).

Good point. In this case though, APE wasn't used to port Kaffe.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [9fans] stdio.h va_list declarations
@ 2002-10-09 13:20 Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2002-10-09 13:20 UTC (permalink / raw)
  To: 9fans

> No it's not.  It's complaining that it has
> no idea what a va_list is, so it thinks it's
> a variable name.  Did you include u.h?

Thanks.  I am trying to compile Kaffe, which presumably compiled
correctly under 3/ed.  Things have moved around a bit or it is my
configuration.

>
> (Va_list and ... mean different things;
> compare printf and vprintf.)

I knew that ☺
Thanks. I was too focused on keeping the compiler happy and '...' is
inclusive of va_list (or whatever type). It is a bad habit.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [9fans] stdio.h va_list declarations
@ 2002-10-09 12:08 Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2002-10-09 12:08 UTC (permalink / raw)
  To: 9fans

I get:

/sys/include/stdio.h:79[temp.cp:405] mixed ansi/old function declaration: vfprintf
/sys/include/stdio.h:80[temp.cp:406] mixed ansi/old function declaration: vprintf
/sys/include/stdio.h:81[temp.cp:407] mixed ansi/old function declaration: vsprintf
/sys/include/stdio.h:82[temp.cp:408] mixed ansi/old function declaration: vsnprintf
/sys/include/stdio.h:83[temp.cp:409] mixed ansi/old function declaration: vfscanf

it is complaining about the use of va_list instead of '...' in the
prototype declaration.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-10-09 17:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09 13:47 [9fans] stdio.h va_list declarations Skip Tavakkolian
  -- strict thread matches above, loose matches on Subject: below --
2002-10-09 17:05 Russ Cox
2002-10-09 16:10 Charles Forsyth
2002-10-09 15:56 Russ Cox
2002-10-09 13:56 Skip Tavakkolian
2002-10-09 13:20 Skip Tavakkolian
2002-10-09 12:08 Skip Tavakkolian

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 NNTP newsgroup(s).