]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Bug #429: Clean-up of reserved identifier violations
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 25 Nov 2013 16:10:51 +0000 (17:10 +0100)
committerMarkus Elfring <elfring@users.sourceforge.net>
Mon, 25 Nov 2013 16:10:51 +0000 (17:10 +0100)
Some identifiers did not fit to the expected naming convention of the
C language standard. This detail was fixed by the deletion of leading underscores.
The probability for name clashes was reduced for the affected include guards
by the addition of a kind of universally unique identifier as a suffix.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
12 files changed:
src/gettext.h
src/rrd.h
src/rrd_client.h
src/rrd_format.h
src/rrd_getopt.h
src/rrd_graph.h
src/rrd_i18n.h
src/rrd_is_thread_safe.h
src/rrd_parsetime.h
src/rrd_rpncalc.h
src/rrd_tool.h
src/rrd_xport.h

index b9380cc9ef9b8a4490a01ebb3fe788686b8ccdbc..4aef2ef0c7270d30c9c34de1b677f469b314c316 100644 (file)
@@ -16,8 +16,8 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
    USA.  */
 
-#ifndef _LIBGETTEXT_H
-#define _LIBGETTEXT_H 1
+#ifndef LIBGETTEXT_H_74E363E9F6924C7DBC4D0ED9C2FA33DF
+#define LIBGETTEXT_H_74E363E9F6924C7DBC4D0ED9C2FA33DF 1
 
 /* NLS can be disabled through the configure --disable-nls option.  */
 #if ENABLE_NLS
index 256d9fa371c1cf7d895e024959a053cf1ac1a6fc..40b80cfe962d24c16b2130161dc0c9faf07d394c 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
@@ -1,3 +1,6 @@
+#ifndef RRDLIB_H_4FD7D37D56A448C392AF46508C56D3CC
+#define RRDLIB_H_4FD7D37D56A448C392AF46508C56D3CC
+
 /*****************************************************************************
  * RRDtool 1.4.3  Copyright by Tobi Oetiker, 1997-2010
  *****************************************************************************
@@ -49,9 +52,6 @@
 extern    "C" {
 #endif
 
-#ifndef _RRDLIB_H
-#define _RRDLIB_H
-
 #include <sys/types.h>  /* for off_t */
 
 #ifndef WIN32
@@ -393,9 +393,9 @@ int       rrd_proc_start_end(
  * RRDTool mailing list and whine about your broken application, you will get
  * hit with something smelly!
  */
-#if defined(_RRD_TOOL_H) || defined(RRD_EXPORT_DEPRECATED)
+#if defined(RRD_TOOL_H_3853987DDF7E4709A5B5849E5A6204F4) || defined(RRD_EXPORT_DEPRECATED)
 
-# if defined(_RRD_TOOL_H)
+# if defined(RRD_TOOL_H_3853987DDF7E4709A5B5849E5A6204F4)
 #  include "rrd_format.h"
 # else
 #  include <rrd_format.h>
@@ -464,8 +464,8 @@ int       rrd_proc_start_end(
               RRD_DEPRECATED;
 #endif                  /* defined(_RRD_TOOL_H) || defined(RRD_EXPORT_DEPRECATED) */
 
-#endif                  /* _RRDLIB_H */
-
 #ifdef  __cplusplus
 }
 #endif
+
+#endif /* RRDLIB_H */
index 81a7b221f02adef0970a89262888042e2674a879..5697963c4ebe0a75d34a08239f567313805e4356 100644 (file)
@@ -24,8 +24,8 @@
  *   Florian octo Forster <octo at verplant.org>
  **/
 
-#ifndef __RRD_CLIENT_H
-#define __RRD_CLIENT_H 1
+#ifndef RRD_CLIENT_H_887A36401735431B937F44DFCAE0B7C9
+#define RRD_CLIENT_H_887A36401735431B937F44DFCAE0B7C9 1
 
 # ifdef HAVE_STDINT_H
 #  include <stdint.h>
index 4046af21628f4e284b1bfc5577453e68886632a5..d4d79538d182f7df6492345745c6590cc3bf03f2 100644 (file)
@@ -4,8 +4,8 @@
  * rrd_format.h  RRD Database Format header
  *****************************************************************************/
 
-#ifndef _RRD_FORMAT_H
-#define _RRD_FORMAT_H
+#ifndef RRD_FORMAT_H_92768FBD7A3446C58B1097BEE038159D
+#define RRD_FORMAT_H_92768FBD7A3446C58B1097BEE038159D
 
 /* 
  * _RRD_TOOL_H
@@ -15,7 +15,7 @@
  *   User is requesting internal function which need this struct. They have
  *   been told that this will change and have agreed to adapt their programs.
  */
-#if !defined(_RRD_TOOL_H) && !defined(RRD_EXPORT_DEPRECATED)
+#if !defined(RRD_TOOL_H_3853987DDF7E4709A5B5849E5A6204F4) && !defined(RRD_EXPORT_DEPRECATED)
 # error "Do not include rrd_format.h directly. Include rrd.h instead!"
 #endif
 
index 1d443f194f0fa18cef6bf4613054c6327fe3a318..cad132cfdb7b6cade628de5ce6a47e35a831ffd5 100644 (file)
@@ -19,8 +19,8 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
+#ifndef GETOPT_H_E19FF44271684D849D8CAC4AD37F92A7
+#define GETOPT_H_E19FF44271684D849D8CAC4AD37F92A7 1
 
 #ifdef __cplusplus
 extern    "C" {
index eca79e2eddca7bf31b1f4852bbf884c2eba1f2b1..fb1feb62596806f9876f698fe371f8be8f7b3220 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _RRD_GRAPH_H
-#define _RRD_GRAPH_H
+#ifndef RRD_GRAPH_H_DBEDBFB6C5844ED9BEA6242F879CA284
+#define RRD_GRAPH_H_DBEDBFB6C5844ED9BEA6242F879CA284
 
 #define y0 cairo_y0
 #define y1 cairo_y1
index 763c67a677a82ede707f47d143c8e19a9964f224..210b8cb11b604c63311328ef755cee7822bbdee4 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef RRD_I18N_H_E9D8F44A32654DF9B92B1862D5371142
+#define RRD_I18N_H_E9D8F44A32654DF9B92B1862D5371142
+
 /*****************************************************************************
  * RRDtool 1.4.3  Copyright by Takao Fujiwara, 2008
  *****************************************************************************
@@ -7,10 +10,6 @@
 extern    "C" {
 #endif
 
-
-#ifndef _RRD_I18N_H
-#define _RRD_I18N_H
-
 #ifdef ENABLE_NLS
 #  ifdef _LIBC
 #    include <libintl.h>
@@ -24,8 +23,8 @@ extern    "C" {
 
 #define N_(String) String
 
-#endif
-
 #ifdef  __cplusplus
 }
 #endif
+
+#endif
index 3990f8d75b9638c93dd3692336038df322163148..12a0678e4d2ac2bef79e96d8cd92f8ef923fb55e 100644 (file)
@@ -9,8 +9,8 @@
  * $Id$
  *************************************************************************** */
 
-#ifndef _RRD_IS_THREAD_SAFE_H
-#define _RRD_IS_THREAD_SAFE_H
+#ifndef RRD_IS_THREAD_SAFE_H_F7EEC7F1E9844C6DB63692B2673768F2
+#define RRD_IS_THREAD_SAFE_H_F7EEC7F1E9844C6DB63692B2673768F2
 
 #ifdef  __cplusplus
 extern    "C" {
index d9a34e80d985a5313642cf3bf72825a81871540b..29e0e8a37603d91cb9e5a3277fa044b2d9165fb9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __PARSETIME_H__
-#define __PARSETIME_H__
+#ifndef PARSETIME_H_B14FE5BC7E96473CB6CA6C7416412687
+#define PARSETIME_H_B14FE5BC7E96473CB6CA6C7416412687
 
 #include <stdio.h>
 
index d27ff4c06fc8025172d758e39e11cb3cbd9f96d1..9661e6a01e10b3125235e680012c6aff7ac4f143 100644 (file)
@@ -3,8 +3,8 @@
  ****************************************************************************
  * rrd_rpncalc.h  RPN calculator functions
  ****************************************************************************/
-#ifndef _RRD_RPNCALC_H
-#define _RRD_RPNCALC_H
+#ifndef RRD_RPNCALC_H_EF2FD77C45C34B71914661372C5B51EA
+#define RRD_RPNCALC_H_EF2FD77C45C34B71914661372C5B51EA
 
 /* WARNING: if new operators are added, they MUST be added at the very end of the list.
  * This is because COMPUTE (CDEF) DS store OP nodes by number (name is not
index 99111979d3d9bf70a664241f4aa85740ce2ae87c..e9c6804826abc9b690b126c4f895470c4198e041 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef RRD_TOOL_H_3853987DDF7E4709A5B5849E5A6204F4
+#define RRD_TOOL_H_3853987DDF7E4709A5B5849E5A6204F4
+
 /*****************************************************************************
  * RRDtool 1.4.3  Copyright by Tobi Oetiker, 1997-2010
  *****************************************************************************
@@ -7,9 +10,6 @@
 extern    "C" {
 #endif
 
-#ifndef _RRD_TOOL_H
-#define _RRD_TOOL_H
-
 #include "rrd_config.h"
 
 #include "rrd.h"
@@ -130,8 +130,8 @@ int rrd_fetch_fn_libdbi(const char *filename, enum cf_en cf_idx,
 
     const char *cf_to_string (enum cf_en cf);
 
-#endif /* _RRD_TOOL_H */
-
 #ifdef  __cplusplus
 }
 #endif
+
+#endif /* RRD_TOOL_H */
index f7d5fdc493e5ece9f514b635a8a41fb6c34e2842..3d0fb1688ed9dbfaba8dbca359fba4c1a7bf1ceb 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef RRD_XPORT_H_C5A7EBAF331140D38C241326B81F357D
+#define RRD_XPORT_H_C5A7EBAF331140D38C241326B81F357D
+
 /****************************************************************************
  * RRDtool 1.4.3  Copyright by Tobi Oetiker, 1997-2010
  ****************************************************************************
@@ -7,9 +10,6 @@
 extern    "C" {
 #endif
 
-#ifndef _RRD_XPORT_H
-#define _RRD_XPORT_H
-
 #define XML_ENCODING     "ISO-8859-1"
 #define ROOT_TAG         "xport"
 #define META_TAG         "meta"
@@ -25,10 +25,8 @@ extern    "C" {
 #define COL_TIME_TAG     "t"
 #define COL_DATA_TAG     "v"
 
-
-#endif
-
-
 #ifdef  __cplusplus
 }
 #endif
+
+#endif