[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] ifconfig fixed (please README)
On Tue, Jun 01, 1999 at 11:19:59AM +0300, Martin-Eric Racine wrote:
> >From what I can tell, the prototype was altered somewhere along the
> line in our libs' include, but it just broke something here.
The functions in support.h are generally non-portable. Their interface is
"subject to change without notice" and now you know why their use is
deprecated.
BTW, just in case, it was not ME!
> > If this doesn't help, please send me the exact error message from
> > gcc and I will tell you how to fix it.
>
> Or, type "make slatach" and see for yourself. Given your
> experience at this, you should be able to figure out the
> answer in 2 minutes. ;-)
I don't have the slattach sources. Anyway, it seems like I have already
given the right advice:
#define _unx2dos libc_unx2dos
...
#include <support.h>
...
#undef _unx2dos
...
int _unx2dos (int my, int private, int interface, ...);
...
You see: You don't need the prototype from support.h, so simply #define it
to another name. As soon as your sources really mean your private
implementation of _unx2dos you #undef it again. It's not clean, but using
_unx2dos is not clean at all.
If you're unsure what really happens do
"gcc -E slattach.c -o slattach.pre"
In "slattach.pre" you will find the preprocessed sources (including all
headers) and you can check if all macros expand as you intended to.
Ciao
Guido
--
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de