ctdb-header: Protect against multiple includes
authorAmitay Isaacs <amitay@gmail.com>
Thu, 15 May 2014 14:07:59 +0000 (00:07 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 20 Jun 2014 21:38:09 +0000 (23:38 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/include/internal/cmdline.h
ctdb/include/internal/idtree.h
ctdb/lib/util/debug.h

index 785595ee6ca5a6fb33e2fb1fb59a868e23067b0b..67704c614e023d3153c1c7d6d28022730e30955e 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef CTDB_CMDLINE_H
+#define CTDB_CMDLINE_H
 
 extern struct poptOption popt_ctdb_cmdline[];
 
@@ -5,3 +7,4 @@ extern struct poptOption popt_ctdb_cmdline[];
 
 struct ctdb_context *ctdb_cmdline_init(struct event_context *ev);
 
+#endif /* CTDB_CMDLINE_H */
index 259af91005652c3b941e3ee4536c1cc74190ed70..d60817a1a8ed639a254f179e33492d4a6f2a3763 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef IDTREE_H
+#define IDTREE_H
+
 struct idr_context *idr_init(TALLOC_CTX *mem_ctx);
 int idr_get_new(struct idr_context *idp, void *ptr, int limit);
 int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit);
@@ -5,3 +8,4 @@ int idr_get_new_random(struct idr_context *idp, void *ptr, int limit);
 void *idr_find(struct idr_context *idp, int id);
 int idr_remove(struct idr_context *idp, int id);
 
+#endif /* IDTREE_H */
index 27490a3dbf95cad51033f5a101993188850491fb..d5a215aff3a0790be287959674de9f6dae6a205a 100644 (file)
@@ -17,6 +17,9 @@
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef UTIL_DEBUG_H
+#define UTIL_DEBUG_H
+
 void (*do_debug_v)(const char *, va_list ap);
 const char *debug_extra;
 void (*do_debug_add_v)(const char *, va_list ap);
@@ -25,3 +28,4 @@ void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 void do_debug_add(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
 void dump_data(int level, const uint8_t *buf1, size_t len);
 
+#endif /* UTIL_DEBUG_H */