delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/06/11/19:48:07

Date: Thu, 11 Jun 1998 19:47:43 -0400 (EDT)
Message-Id: <199806112347.TAA11699@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: nate AT cartsys DOT com
CC: djgpp-workers AT delorie DOT com
In-reply-to: <357F49A7.32840FE@cartsys.com> (message from Nate Eldredge on
Wed, 10 Jun 1998 20:06:15 -0700)
Subject: Re: inb/outb

> The `inb' and `outb' functions are missing their prototypes in <pc.h>.
> Here is a patch.

Beware - some prototypes are left out of headers because various
systems have conflicting definitions of them.  xmalloc, for example,
is defined different ways in different GNU packages, and none expect
the system headers to have them.

> Btw, is there a problem with doing `#define inb inportb' and similar
> either in that file or in <inlines/pc.h>?  That would allow people using
> the alternate names to get the inline advantage.

If the #define is after the prototype, the prototype never gets used.
If it's before the prototype, the prototype causes a syntax error.
Why not just include the #define and skip the prototype?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019