activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Strasheim (JIRA)" <>
Subject [jira] Created: (AMQCPP-31) Consider giving the unix #define a more unique name
Date Fri, 22 Dec 2006 23:26:02 GMT
Consider giving the unix #define a more unique name

                 Key: AMQCPP-31
             Project: ActiveMQ C++ Client
          Issue Type: Wish
    Affects Versions: 1.0, 1.1
            Reporter: Albert Strasheim
         Assigned To: Nathan Mittler

src\main\activemq\concurrent\Mutex.h and src\main\activemq\concurrent\Thread.cpp check if
"unix" is defined to enable UNIX-specific functionality.

>From what I've seen in other projects, it's considered a good practice to "scope" your
defines, i.e. unix should rather be something like ACTIVEMQ_CPP_UNIX. This virtually eliminates
problems when integrating multiple libraries, where defines like "unix" might mean different
things to different libraries, meaning the user will have to do some messy preprocessor gymnastics
when trying to include headers from multiple libraries in the same file.

This also provides an obvious naming convention for other defines. Need, e.g., OpenBSD-specific
code? Use ACTIVEMQ_CPP_OPENBSD. On Unix systems, autoconf can probably take care of this kind
of thing.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message