From: Markus Elfring Date: Mon, 25 Nov 2013 16:10:51 +0000 (+0100) Subject: Bug #429: Clean-up of reserved identifier violations X-Git-Tag: v1.5.0-rc1~139^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e329f156675b9696f5499634e794f90d294d295;p=thirdparty%2Frrdtool-1.x.git Bug #429: Clean-up of reserved identifier violations 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 --- diff --git a/src/gettext.h b/src/gettext.h index b9380cc9..4aef2ef0 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -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 diff --git a/src/rrd.h b/src/rrd.h index 256d9fa3..40b80cfe 100644 --- 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 /* 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 @@ -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 */ diff --git a/src/rrd_client.h b/src/rrd_client.h index 81a7b221..5697963c 100644 --- a/src/rrd_client.h +++ b/src/rrd_client.h @@ -24,8 +24,8 @@ * Florian octo Forster **/ -#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 diff --git a/src/rrd_format.h b/src/rrd_format.h index 4046af21..d4d79538 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -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 diff --git a/src/rrd_getopt.h b/src/rrd_getopt.h index 1d443f19..cad132cf 100644 --- a/src/rrd_getopt.h +++ b/src/rrd_getopt.h @@ -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" { diff --git a/src/rrd_graph.h b/src/rrd_graph.h index eca79e2e..fb1feb62 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -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 diff --git a/src/rrd_i18n.h b/src/rrd_i18n.h index 763c67a6..210b8cb1 100644 --- a/src/rrd_i18n.h +++ b/src/rrd_i18n.h @@ -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 @@ -24,8 +23,8 @@ extern "C" { #define N_(String) String -#endif - #ifdef __cplusplus } #endif + +#endif diff --git a/src/rrd_is_thread_safe.h b/src/rrd_is_thread_safe.h index 3990f8d7..12a0678e 100644 --- a/src/rrd_is_thread_safe.h +++ b/src/rrd_is_thread_safe.h @@ -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" { diff --git a/src/rrd_parsetime.h b/src/rrd_parsetime.h index d9a34e80..29e0e8a3 100644 --- a/src/rrd_parsetime.h +++ b/src/rrd_parsetime.h @@ -1,5 +1,5 @@ -#ifndef __PARSETIME_H__ -#define __PARSETIME_H__ +#ifndef PARSETIME_H_B14FE5BC7E96473CB6CA6C7416412687 +#define PARSETIME_H_B14FE5BC7E96473CB6CA6C7416412687 #include diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index d27ff4c0..9661e6a0 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -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 diff --git a/src/rrd_tool.h b/src/rrd_tool.h index 99111979..e9c68048 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -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 */ diff --git a/src/rrd_xport.h b/src/rrd_xport.h index f7d5fdc4..3d0fb168 100644 --- a/src/rrd_xport.h +++ b/src/rrd_xport.h @@ -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