tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
major/minor(3) macros conflict with regular code
Hi,
I have some code that defines these methods in a C++ class:
  int32_t major() const
  int32_t minor() const
(for the context: this is in protobuf generated code from a message
that has major/minor fields).
The generated code fails to compile because it conflicts with major(3)
macro and minor(3) macros from sys/types.h:
#define major(x)        ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >>  8))
#define minor(x) ...
Do major(3) and minor(3) really need to be macros?
Thanks,
Anthony
Home |
Main Index |
Thread Index |
Old Index