Use #pragma once instead of #ifndef

Only the public header maintains #ifndef in the header, together with
pragma. The other ones contain only pragma.

As reported by Shawn Landden on systemd mailing list this is compatible
with all major compilers and gcc has this since version 3.3.
diff --git a/libkmod/libkmod-array.h b/libkmod/libkmod-array.h
index 6400993..dd2ba55 100644
--- a/libkmod/libkmod-array.h
+++ b/libkmod/libkmod-array.h
@@ -1,5 +1,4 @@
-#ifndef _LIBKMOD_ARRAY_H_
-#define _LIBKMOD_ARRAY_H_
+#pragma once
 
 /*
  * Declaration of struct array is in header because we may want to embed the
@@ -19,5 +18,3 @@
 void array_free_array(struct array *array);
 void array_sort(struct array *array, int (*cmp)(const void *a, const void *b));
 int array_remove_at(struct array *array, unsigned int pos);
-
-#endif
diff --git a/libkmod/libkmod-hash.h b/libkmod/libkmod-hash.h
index 8f20b8f..ca0af05 100644
--- a/libkmod/libkmod-hash.h
+++ b/libkmod/libkmod-hash.h
@@ -1,5 +1,4 @@
-#ifndef _LIBKMOD_HASH_H_
-#define _LIBKMOD_HASH_H_
+#pragma once
 
 #include <stdbool.h>
 
@@ -21,5 +20,3 @@
 void hash_iter_init(const struct hash *hash, struct hash_iter *iter);
 bool hash_iter_next(struct hash_iter *iter, const char **key,
 							const void **value);
-
-#endif
diff --git a/libkmod/libkmod-index.h b/libkmod/libkmod-index.h
index dd3a762..6eb77b9 100644
--- a/libkmod/libkmod-index.h
+++ b/libkmod/libkmod-index.h
@@ -18,8 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _LIBKMOD_INDEX_H
-#define _LIBKMOD_INDEX_H
+#pragma once
 
 #include <stdint.h>
 
@@ -127,5 +126,3 @@
 char *index_mm_search(struct index_mm *idx, const char *key);
 struct index_value *index_mm_searchwild(struct index_mm *idx, const char *key);
 void index_mm_dump(struct index_mm *idx, int fd, const char *prefix);
-
-#endif
diff --git a/libkmod/libkmod-private.h b/libkmod/libkmod-private.h
index 7c2602d..9061854 100644
--- a/libkmod/libkmod-private.h
+++ b/libkmod/libkmod-private.h
@@ -1,5 +1,4 @@
-#ifndef _LIBKMOD_PRIVATE_H_
-#define _LIBKMOD_PRIVATE_H_
+#pragma once
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -170,5 +169,3 @@
 
 /* util functions */
 #include "libkmod-util.h"
-
-#endif
diff --git a/libkmod/libkmod-util.h b/libkmod/libkmod-util.h
index 7130ae0..5fe3e02 100644
--- a/libkmod/libkmod-util.h
+++ b/libkmod/libkmod-util.h
@@ -1,6 +1,4 @@
-#ifndef _LIBKMOD_UTIL_H_
-#define _LIBKMOD_UTIL_H_
-
+#pragma once
 #include "macro.h"
 
 #include <limits.h>
@@ -42,5 +40,3 @@
 	} *__p = (typeof(__p)) (ptr);		\
 	__p->__v = (val);			\
 } while(0)
-
-#endif
diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h
index f907e1d..2f813a8 100644
--- a/libkmod/libkmod.h
+++ b/libkmod/libkmod.h
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#pragma once
 #ifndef _LIBKMOD_H_
 #define _LIBKMOD_H_
 
diff --git a/libkmod/macro.h b/libkmod/macro.h
index e5c9763..689c57a 100644
--- a/libkmod/macro.h
+++ b/libkmod/macro.h
@@ -17,9 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-
-#ifndef _LIBKMOD_MACRO_H_
-#define _LIBKMOD_MACRO_H_
+#pragma once
 
 #include <stddef.h>
 
@@ -82,5 +80,3 @@
 #define _printf_format_(a,b) __attribute__((format (printf, a, b)))
 #define _unused_ __attribute__((unused))
 #define _always_inline_ __inline__ __attribute__((always_inline))
-
-#endif