HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-devel] evilness in header files: conflicting ATTR_VERSION



in condor_includes/condor_attributes.h, we have this:

#define ATTR_VERSION                    AttrGetName( ATTRE_VERSION )

Jiansheng is porting Quill++ to Oracle, and their header files
include:

namespace oracle {
namespace occi {
/*---------------------------------------------------------------------------
                     PUBLIC TYPES AND CONSTANTS
  ---------------------------------------------------------------------------*/

class MetaData
{
  public :
      enum AttrId
      {ATTR_PTYPE = OCI_ATTR_PTYPE,
      ATTR_TIMESTAMP = OCI_ATTR_TIMESTAMP,
      <...>
      ATTR_NAME = OCI_ATTR_NAME,
      <...>
      ATTR_VERSION = OCI_ATTR_VERSION,



For now, we're just #undefing ATTR_VERSION before including the oracle
header file, but I think this is another example of why Condor should
use namespaces, either by using the namespace {} stuff in C++, or
using names like ATTR_CONDOR_VERSION and ATTR_CONDOR_WHATEVER.

-Erik