www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - dtsearch: IO.H & #define tell

reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
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
Jul 29 2002
parent reply Jan Knepper <jan smartsoft.cc> writes:
"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?
Jul 29 2002
parent reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
"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
Jul 29 2002
parent reply "Walter" <walter digitalmars.com> writes:
"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>.
Jul 29 2002
parent reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
"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
Jul 29 2002
parent "Walter" <walter digitalmars.com> writes:
"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.
Jul 30 2002