minor fixes for clang++
[senf.git] / senf / config.hh
index cfa9319..4e28194 100644 (file)
@@ -2,23 +2,28 @@
 //
 // Copyright (C) 2007
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Stefan Bund <g0dil@berlios.de>
 //
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// The contents of this file are subject to the Fraunhofer FOKUS Public License
+// Version 1.0 (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at 
+// http://senf.berlios.de/license.html
 //
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
+// The Fraunhofer FOKUS Public License Version 1.0 is based on, 
+// but modifies the Mozilla Public License Version 1.1.
+// See the full license text for the amendments.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// Software distributed under the License is distributed on an "AS IS" basis, 
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
+// for the specific language governing rights and limitations under the License.
+//
+// The Original Code is Fraunhofer FOKUS code.
+//
+// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. 
+// (registered association), Hansastraße 27 c, 80686 Munich, Germany.
+// All Rights Reserved.
+//
+// Contributor(s):
+//   Stefan Bund <g0dil@berlios.de>
 
 /** \file
     \brief config public header */
@@ -30,7 +35,7 @@
 #include <boost/cstdint.hpp>
 #include <limits.h>
 
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace senf {
 namespace config {
@@ -39,43 +44,33 @@ namespace config {
 
 }}
 
+# include "autoconf.hh"
 # include "local_config.hh"
 #
 # ifndef SENF_ABSOLUTE_INCLUDE_PATH
-#     define SENF_ABSOLUTE_INCLUDE_PATH(senf_relative_include_file_path) <senf/senf_relative_include_file_path>
+#     define SENF_ABSOLUTE_INCLUDE_PATH(senf_relative_include_file_path) \
+          <senf/senf_relative_include_file_path>
 # endif
 #
 # ifndef SENF_copy_n
-#     include <algorithm>
-#     if defined(__GNUC__) && ! defined(_STLP_ALGORITHM) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=4))
+#     ifdef HAVE_GNUCXX_COPYN
 #         include <ext/algorithm>
-#         define SENF_copy_n __gnu_cxx::copy_n
-#     else
-#         define SENF_copy_n std::copy_n
+          namespace senf { namespace config { using __gnu_cxx::copy_n; }}
 #     endif
-# endif
+#     ifdef HAVE_STD_COPYN
+#         include <algorithm>
+          namespace senf { namespace config { using std::copy_n; }}
+#     endif
+#  endif
 #
 # ifndef SENF_MPL_RV_ALIGNMENT
 #     define SENF_MPL_RV_ALIGNMENT 16
 # endif
 #
-# if !defined(SENF_BUFFER_USE_LOCALS) && !defined(SENF_BUFFER_USE_ALLOCA) && !defined(SENF_BUFFER_USE_NEW)
-#
-#     if defined(__GNUC__)
-#         define SENF_BUFFER_USE_LOCALS 1
-#
-#     // Add other compilers here ...
-#
-#     // dynamic arrays are part of C99. Which is NOT part of C++
-#     // but lets try nonetheless ...
-#     elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#         define SENF_BUFFER_USE_LOCALS 1
-#     endif
-#
-#     if !defined(SENF_BUFFER_USE_LOCALS) && !defined(SENF_BUFFER_USE_ALLOCA)
-#         define SENF_BUFFER_USE_NEW 1
-#     endif
-#
+# if    !defined(SENF_BUFFER_USE_LOCALS) \
+     && !defined(SENF_BUFFER_USE_ALLOCA) \
+     && !defined(SENF_BUFFER_USE_NEW)
+#     define SENF_BUFFER_USE_NEW 1
 # endif
 #
 # ifndef SENF_SENFLOG_LIMIT
@@ -98,11 +93,20 @@ namespace config {
 #     define PHOENIX_LIMIT 6
 # endif
 #
-# if __GLIBC__>=2 && __GLIBC_MINOR__>=8
-#     define HAVE_TIMERFD 1
+# ifndef SENF_PACKET_ANNOTATION_SLOTS
+#     define SENF_PACKET_ANNOTATION_SLOTS 8
 # endif
-
-///////////////////////////////hh.e////////////////////////////////////////
+#
+# ifndef SENF_PACKET_ANNOTATION_SLOTSIZE
+#     define SENF_PACKET_ANNOTATION_SLOTSIZE 16
+# endif
+#
+# ifdef SENF_DEBUG
+#     ifdef HAVE_EXECINFO_H
+#          define SENF_BACKTRACE
+#     endif
+# endif
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #endif
 
 \f
@@ -115,4 +119,3 @@ namespace config {
 // ispell-local-dictionary: "american"
 // compile-command: "scons -u all_tests"
 // End:
-