Thread overview
dtsearch: IO.H & #define tell
Jul 29, 2002
Robert M. Münch
Jul 29, 2002
Jan Knepper
Jul 29, 2002
Robert M. Münch
Jul 29, 2002
Walter
Jul 30, 2002
Robert M. Münch
Jul 30, 2002
Walter
July 29, 2002
Hi, the library I try to compile uses a member function named tell. Anyhow the DMC file IO.H seems to get included somewhere which defines tell as a macro (line: 117) leading to undesired macro expansion. What to do in such a case? Why is this macro definition done?

--
Robert M. Münch
IT & Management Freelancer
Mobile: +49 (0)177 2452 802
Fax   : +49 (0)721 8408 9112
Web   : http://www.robertmuench.de



July 29, 2002
"Robert M. Münch" wrote:

> Hi, the library I try to compile uses a member function named tell. Anyhow the DMC file IO.H seems to get included somewhere which defines tell as a macro (line: 117) leading to undesired macro expansion. What to do in such a case? Why is this macro definition done?

What about #undef?


July 29, 2002
"Jan Knepper" <jan@smartsoft.cc> schrieb im Newsbeitrag news:3D456898.F587749D@smartsoft.cc...

> What about #undef?

I tried it in my main program, but the include hierarchy seems to get the definition in somewhere. So I would have to change the vendor supplied code in that I just use an #undef before the specific line of code. I'm not sure if this is the way to go...

Isn't it that such "compiler internal/implementation dependend" symbols should use a _ or even a __ as first char(s) to avoid such problems? Robert


July 29, 2002
"Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:ai3tce$5ml$1@digitaldaemon.com...
> Isn't it that such "compiler internal/implementation dependend" symbols should use a _ or even a __ as first char(s) to avoid such problems?
Robert

Yes, but then there's the issue of compiling legacy code.

I suggest just commenting out the tell() definition that's causing grief.
It's not sacred <g>.


July 30, 2002
"Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:ai4253$b9u$2@digitaldaemon.com...

> Yes, but then there's the issue of compiling legacy code.
>
> I suggest just commenting out the tell() definition that's causing grief.
> It's not sacred <g>.

Hi, ok I do that. But for what kind of code is this define needed? Robert


July 30, 2002
"Robert M. Münch" <robert.muench@robertmuench.de> wrote in message news:ai5b5l$1qvr$1@digitaldaemon.com...
> "Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:ai4253$b9u$2@digitaldaemon.com...
>
> > Yes, but then there's the issue of compiling legacy code.
> >
> > I suggest just commenting out the tell() definition that's causing
grief.
> > It's not sacred <g>.
>
> Hi, ok I do that. But for what kind of code is this define needed? Robert

tell() is an old unix-ism.