Ethereal-dev: RE: [Ethereal-dev] lot's of warnings: redefinition of symbol 'OPT IONAL'
This is also true for other #defined constants in other protocol where we
assume that they are not defined elsewhere. Sometimes dangerous assumptions
are made, like redefining DELETE when building on Windows...
Shouldn't we add something like
Prefer using PDU_DELETE (or PROTO_PDU_DELETE) rather than DELETE.
in the Readme.developer file?
E.g., in packet-wsp.c: DELETE --> WSP_PDU_DELETE
Regards,
Olivier
-----Original Message-----
From: Ulf Lamping
Subject: [Ethereal-dev] lot's of warnings: redefinition of symbol 'OPTIONAL'
Hi List!
When I'm trying to compile with msvc, I'm getting lot's of warnings like
this:
packet-per.h(41) : warning C4005: 'OPTIONAL' : Makro-Neudefinition
E:\PROGRA~1\MICROS~3\VC98\INCLUDE\rpcdce.h(24) : Siehe vorherige
Definition von 'OPTIONAL'
(translated to english something like: redefinition of symbol 'OPTIONAL')
As the name OPTIONAL isn't very unique, I would suggest to rename OPTIONAL
in file packet-per.h to something like PER_OPTIONAL or such and change the
.c files using this define.
This task will be much easier for someone compiling on a unix machine (on
msvc you won't get an undefined error :-( and being able to check in sources
directly, so I didn't made a patch on this topic.
Of course, it would be also a good idea to rename the other similiar defines
in the file packet-per.h to something more unique... :-)
Regards, ULFL