summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_options.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2013-10-15 12:13:11 -0400
committerBenety Goh <benety@mongodb.com>2013-10-15 12:13:11 -0400
commit506fe5ad46b9a0d083af61f4e52a5726f2656949 (patch)
treee5396e1c2366360bcf7d4a55e91dc131d8a7a56a /src/mongo/db/server_options.cpp
parentd1c2ae72c4829ed77cb6b7fe42e486910483caff (diff)
downloadmongo-506fe5ad46b9a0d083af61f4e52a5726f2656949.tar.gz
SERVER-11160 detect missing facilitynames in platform agnostic manner
Diffstat (limited to 'src/mongo/db/server_options.cpp')
-rw-r--r--src/mongo/db/server_options.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mongo/db/server_options.cpp b/src/mongo/db/server_options.cpp
index f75ef86f8b9..99caa9d2772 100644
--- a/src/mongo/db/server_options.cpp
+++ b/src/mongo/db/server_options.cpp
@@ -50,21 +50,16 @@ namespace mongo {
/**
* SERVER-11160 syslog.h does not define facilitynames under solaris
- * Besides facilitynames, there are other macros defined under linux
- * that are not provided by solaris. Those will not be reproduced here.
+ * If syslog.h exports preprocessor macro INTERNAL_NOPRI if
+ * facilitynames is provided. This will be used to determine
+ * if facilitynames should be defined here.
* These could also go into a syslog.h compatibility header.
*/
namespace {
#if defined(SYSLOG_NAMES)
-#if defined(__sunos__)
-
-#if !defined(LOG_MAKEPRI)
-# define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
-#endif // !defined(LOG_MAKEPRI)
-
-#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0)
+#if !defined(INTERNAL_NOPRI)
typedef struct _code {
const char* c_name;
@@ -79,7 +74,6 @@ namespace {
{ "kern", LOG_KERN },
{ "lpr", LOG_LPR },
{ "mail", LOG_MAIL },
- { "mark", INTERNAL_MARK }, /* INTERNAL */
{ "news", LOG_NEWS },
{ "security", LOG_AUTH }, /* DEPRECATED */
{ "syslog", LOG_SYSLOG },
@@ -96,7 +90,7 @@ namespace {
{ NULL, -1 }
};
-#endif // defined(__sunos__)
+#endif // !defined(INTERNAL_NOPRI)
#endif // defined(SYSLOG_NAMES)
} // namespace