Ethereal-dev: RE: [Ethereal-dev] MSVC: Conflicting macro names in packet-dcerpc -svcctl.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Wed, 26 Nov 2003 09:29:22 +0100
Similar problems have already been put up ~6 weeks ago. Guy updated
README.developer:

For #define names and enum member names, prefix the names with a tag so
as to avoid collisions with other names - this might be more of an issue
on Windows, as it appears to #define names such as DELETE and
OPTIONAL.

Regards,

Olivier

| -----Original Message-----
| From: Ulf Lamping
| 
| Hi List!
| 
| When I compile the latest CVS (although this conflict is 
| *much* older), I get the following warnings:
| 
| packet-dcerpc-svcctl.c
| packet-dcerpc-svcctl.c(389) : warning C4005: 'SERVICE_DRIVER' 
| : Makro-Neudefinition
|         C:\PROGRA~1\MICROS~3\VC98\INCLUDE\winnt.h(6929) : 
| Siehe vorherige Definition von 'SERVICE_DRIVER'
| packet-dcerpc-svcctl.c(390) : warning C4005: 'SERVICE_WIN32' 
| : Makro-Neudefinition
|         C:\PROGRA~1\MICROS~3\VC98\INCLUDE\winnt.h(6934) : 
| Siehe vorherige Definition von 'SERVICE_WIN32'
| packet-dcerpc-svcctl.c(397) : warning C4005: 'SERVICE_ACTIVE' 
| : Makro-Neudefinition
|         C:\PROGRA~1\MICROS~3\VC98\INCLUDE\winsvc.h(83) : 
| Siehe vorherige Definition von 'SERVICE_ACTIVE'
| packet-dcerpc-svcctl.c(398) : warning C4005: 
| 'SERVICE_INACTIVE' : Makro-Neudefinition
|         C:\PROGRA~1\MICROS~3\VC98\INCLUDE\winsvc.h(84) : 
| Siehe vorherige Definition von 'SERVICE_INACTIVE'
| packet-dcerpc-svcctl.c(399) : warning C4005: 
| 'SERVICE_STATE_ALL' : Makro-Neudefinition
|         C:\PROGRA~1\MICROS~3\VC98\INCLUDE\winsvc.h(86) : 
| Siehe vorherige Definition von 'SERVICE_STATE_ALL'
| 
| Warning texts translated to english:
| "Makro-Neudefinition" -> "macro redefinition"
| "Siehe vorherige Definition von" -> "see previous definition of"
| 
| The macro names seems to be conflicting with the definitions 
| in the windows header file winnt.h!
| 
| Could someone resolve this problem, by renaming the 
| definitions in packet-dcerpc-svcctl.c?
| Maybe to something like SERVICE_CONTROL_...?
| 
| I don't want to do this myself, as I have no knowledge of this file.
| 
| Regards, ULFL