Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / Buffer.hh
index b61d13e..4510010 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// 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
 /** \file
     \brief Buffer public header */
 
-#ifndef HH_Buffer_
-#define HH_Buffer_ 1
+#ifndef HH_SENF_Utils_Buffer_
+#define HH_SENF_Utils_Buffer_ 1
 
 // Custom includes
+#include "../config.hh"
 
 //#include "Buffer.mpp"
 ///////////////////////////////hh.p////////////////////////////////////////
 
-#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
-#
-#endif
-
 #if defined(SENF_BUFFER_USE_LOCALS)
 
 #   define SENF_SCOPED_BUFFER(type, sym, size)  \
@@ -73,7 +53,7 @@
         type.
 
         This macro is used when \a size is a dynamic expression and not a constant value. For constant
-        values, use \c boost::aray (or C++ builtin arrays). Depending on compiler support, this version
+        values, use \c boost::array (or C++ builtin arrays). Depending on compiler support, this version
         will try to avoid dynamic memory allocation. The type of the declared local variable \a sym is
         either pointer to \a type or array of \a type: