www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

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

↑ ↓ ← "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
↑ ↓ 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
↑ ↓ "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
↑ ↓ "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?

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
↑ ↓ "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
↑ ↓ → "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


 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