Sender: nate AT cartsys DOT com Message-ID: <358339A9.3CEF938B@cartsys.com> Date: Sat, 13 Jun 1998 19:47:05 -0700 From: Nate Eldredge MIME-Version: 1.0 To: DJ Delorie CC: djgpp-workers AT delorie DOT com Subject: Re: inb/outb References: <199806112347 DOT TAA11699 AT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk DJ Delorie wrote: > > > The `inb' and `outb' functions are missing their prototypes in . > > 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 ? 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? Isn't it generally required that library functions that are implemented as macros also have function versions? I.e. I believe people are supposed to be able to do: #undef func func(42); I'm fairly sure that applies to ANSI; of course, with a nonportable function like `inb' all bets are off. That would, however, work fine with putting the #define after the prototype. -- Nate Eldredge nate AT cartsys DOT com