summaryrefslogtreecommitdiff
path: root/lib/di-set.h
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-02-08 11:54:05 +0100
committerJim Meyering <meyering@redhat.com>2011-02-08 11:54:05 +0100
commitd9f5da66f7c95f84b6b28b17cfa4c5248ad2b591 (patch)
treedd9cb2cb5392c1f6e6e17f15dab53e5fc053782d /lib/di-set.h
parent2305b66555d8812eb26002b51b5ee1f4a1a5186a (diff)
downloadgnulib-d9f5da66f7c95f84b6b28b17cfa4c5248ad2b591.tar.gz
di-set.h, ino-map.h: add multiple-inclusion guard
Technically, the guard is required only for ino-map.h, due to its INO_MAP_INSERT_FAILURE definition, but do both for consistency. * lib/di-set.h: Add file-spanning #ifndef _GL_DI_SET_H. * lib/ino-map.h: Likewise.
Diffstat (limited to 'lib/di-set.h')
-rw-r--r--lib/di-set.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/di-set.h b/lib/di-set.h
index f05e8760c3..318e9aec13 100644
--- a/lib/di-set.h
+++ b/lib/di-set.h
@@ -1,14 +1,19 @@
-#include <sys/types.h>
+#ifndef _GL_DI_SET_H
+# define _GL_DI_SET_H
-#undef _ATTRIBUTE_NONNULL_
-#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
-# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
-#else
-# define _ATTRIBUTE_NONNULL_(m)
-#endif
+# include <sys/types.h>
+
+# undef _ATTRIBUTE_NONNULL_
+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
+# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
+# else
+# define _ATTRIBUTE_NONNULL_(m)
+# endif
struct di_set *di_set_alloc (void);
int di_set_insert (struct di_set *, dev_t, ino_t) _ATTRIBUTE_NONNULL_ (1);
void di_set_free (struct di_set *) _ATTRIBUTE_NONNULL_ (1);
int di_set_lookup (struct di_set *dis, dev_t dev, ino_t ino)
- _ATTRIBUTE_NONNULL_ (1);;
+ _ATTRIBUTE_NONNULL_ (1);
+
+#endif