Commit 38e7d6cc authored by Marcus Folkesson's avatar Marcus Folkesson Committed by Anthony G. Basile

consistently use #pragma once for header files

Some headerfiles are missing "#pragma once" or corresponding
"#ifndef..." which may result in build error if multiple source files
include the same file.

Use "#pragma once" for all header files.
Signed-off-by: 's avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: 's avatarAnthony G. Basile <blueness@gentoo.org>
parent 12092498
......@@ -17,8 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef _LIBUDEV_HWDB_DEF_H_
#define _LIBUDEV_HWDB_DEF_H_
#pragma once
#include "sparse-endian.h"
......@@ -70,5 +69,3 @@ struct trie_value_entry_f {
le64_t key_off;
le64_t value_off;
} _packed_;
#endif
......@@ -17,8 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef _LIBUDEV_PRIVATE_H_
#define _LIBUDEV_PRIVATE_H_
#pragma once
#include <signal.h>
#include <stdint.h>
......@@ -150,5 +149,3 @@ uint64_t util_string_bloom64(const char *str);
/* libudev-util-private.c */
int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value);
#endif
......@@ -17,8 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef _LIBUDEV_H_
#define _LIBUDEV_H_
#pragma once
#include <stdarg.h>
#include <sys/sysmacros.h>
......@@ -205,5 +204,3 @@ int udev_util_encode_string(const char *str, char *str_enc, size_t len);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif
......@@ -17,6 +17,8 @@
* Boston, MA 02110-1301 USA
*/
#pragma once
#include <mtd/mtd-user.h>
#include "macro.h"
......
......@@ -10,6 +10,8 @@
* Free Software Foundation version 2 of the License.
*/
#pragma once
#include <scsi/scsi.h>
struct scsi_ioctl_command {
......
......@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define MAX_PATH_LEN 512
/*
......
......@@ -2,8 +2,7 @@
// MurmurHash2 was written by Austin Appleby, and is placed in the public
// domain. The author hereby disclaims copyright to this source code.
#ifndef _MURMURHASH2_H_
#define _MURMURHASH2_H_
#pragma once
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
......@@ -29,5 +28,3 @@ typedef unsigned __int64 uint64_t;
uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed );
//-----------------------------------------------------------------------------
#endif // _MURMURHASH2_H_
......@@ -17,5 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
int encode_devnode_name(const char *str, char *str_enc, size_t len);
int whitelisted_char_for_devnode(char c, const char *additional);
......@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include <stddef.h>
#include <stdio.h>
......
#ifndef IOPRIO_H
#define IOPRIO_H
#pragma once
/* This is minimal version of Linux' linux/ioprio.h header file, which
* is licensed GPL2 */
......@@ -16,5 +15,3 @@ enum {
IOPRIO_CLASS_BE,
IOPRIO_CLASS_IDLE,
};
#endif
......@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include <stdbool.h>
#include "macro.h"
......
#pragma once
#include <inttypes.h>
#include <sys/types.h>
......
......@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#pragma once
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/un.h>
......
......@@ -18,8 +18,8 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef SPARSE_ENDIAN_H
#define SPARSE_ENDIAN_H
#pragma once
#include <byteswap.h>
#include <endian.h>
......@@ -84,5 +84,3 @@ static inline uint64_t le64toh(le64_t value) { return bswap_64_on_be((uint64_t _
static inline uint16_t be16toh(be16_t value) { return bswap_16_on_le((uint16_t __force)value); }
static inline uint32_t be32toh(be32_t value) { return bswap_32_on_le((uint32_t __force)value); }
static inline uint64_t be64toh(be64_t value) { return bswap_64_on_le((uint64_t __force)value); }
#endif /* SPARSE_ENDIAN_H */
......@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "udev.h"
struct udev_device *find_device(struct udev *udev,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment