Jelajahi Sumber

- explicitly include utils_base.h from utils.h
- put utils.h inside of an #ifndef/#endif


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1474 f882894a-f735-0410-b71e-b25c423dba1c

M. Sean Finney 19 tahun lalu
induk
melakukan
8efd2d1d90
2 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 4 0
      lib/utils_base.h
  2. 3 0
      plugins/utils.h

+ 4 - 0
lib/utils_base.h

@@ -1,3 +1,5 @@
+#ifndef _UTILS_BASE_
+#define _UTILS_BASE_
 /* Header file for nagios plugins utils_base.c */
 /* Header file for nagios plugins utils_base.c */
 
 
 /* This file holds header information for thresholds - use this in preference to 
 /* This file holds header information for thresholds - use this in preference to 
@@ -35,3 +37,5 @@ int get_status(double, thresholds *);
 char *np_escaped_string (const char *);
 char *np_escaped_string (const char *);
 
 
 void die (int, const char *, ...) __attribute__((noreturn,format(printf, 2, 3)));
 void die (int, const char *, ...) __attribute__((noreturn,format(printf, 2, 3)));
+
+#endif /* _UTILS_BASE_ */

+ 3 - 0
plugins/utils.h

@@ -13,6 +13,9 @@ in order to resist overflow attacks. In addition, a few functions are
 provided to standardize version and error reporting across the entire
 provided to standardize version and error reporting across the entire
 suite of plugins. */
 suite of plugins. */
 
 
+/* now some functions etc are being defined in ../lib/utils_base.c */
+#include "utils_base.h"
+
 /* Standardize version information, termination */
 /* Standardize version information, termination */
 
 
 /* $Id$ */
 /* $Id$ */