From b426e7104d1f13ad8ddd86285e7244e92b8e4cd4 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 7 Nov 2015 13:13:12 +0100 Subject: [PATCH] Add #pragma once directives in all our headers, for safety. --- src/common/fuzz.h | 2 ++ src/common/random.h | 2 ++ src/common/ranges.h | 2 ++ src/libzzuf/debug.h | 2 ++ src/libzzuf/lib-load.h | 2 ++ src/libzzuf/network.h | 2 ++ src/libzzuf/sys.h | 2 ++ src/myfork.h | 2 ++ src/timer.h | 2 ++ src/util/getopt.h | 2 ++ src/util/hex.h | 2 ++ src/util/md5.h | 2 ++ src/util/mutex.h | 2 ++ 13 files changed, 26 insertions(+) diff --git a/src/common/fuzz.h b/src/common/fuzz.h index 2b35fc8..3e0f352 100644 --- a/src/common/fuzz.h +++ b/src/common/fuzz.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * fuzz.h: fuzz functions */ diff --git a/src/common/random.h b/src/common/random.h index 35d91e4..0197459 100644 --- a/src/common/random.h +++ b/src/common/random.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * random.h: pseudorandom number generator */ diff --git a/src/common/ranges.h b/src/common/ranges.h index 411171f..656d29a 100644 --- a/src/common/ranges.h +++ b/src/common/ranges.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * ranges.c: range handling helper functions */ diff --git a/src/libzzuf/debug.h b/src/libzzuf/debug.h index d628f0e..eb9f9c6 100644 --- a/src/libzzuf/debug.h +++ b/src/libzzuf/debug.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * debug.h: debugging support */ diff --git a/src/libzzuf/lib-load.h b/src/libzzuf/lib-load.h index 1f2300b..0a1df54 100644 --- a/src/libzzuf/lib-load.h +++ b/src/libzzuf/lib-load.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * lib-load.h: preload library functions */ diff --git a/src/libzzuf/network.h b/src/libzzuf/network.h index 661ea32..978435f 100644 --- a/src/libzzuf/network.h +++ b/src/libzzuf/network.h @@ -11,6 +11,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * network.h: network connection helper functions */ diff --git a/src/libzzuf/sys.h b/src/libzzuf/sys.h index a07cbdd..2f94a75 100644 --- a/src/libzzuf/sys.h +++ b/src/libzzuf/sys.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * sys.h: system-dependent initialisation */ diff --git a/src/myfork.h b/src/myfork.h index 679183c..120ef18 100644 --- a/src/myfork.h +++ b/src/myfork.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * myfork.h: process handling functions */ diff --git a/src/timer.h b/src/timer.h index feeab48..5c04b5c 100644 --- a/src/timer.h +++ b/src/timer.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * timer.h: timing functions */ diff --git a/src/util/getopt.h b/src/util/getopt.h index dfebc67..9427b69 100644 --- a/src/util/getopt.h +++ b/src/util/getopt.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * getopt.h: getopt_long reimplementation */ diff --git a/src/util/hex.h b/src/util/hex.h index af5c729..61666d5 100644 --- a/src/util/hex.h +++ b/src/util/hex.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * hex.h: hexadecimal data dump */ diff --git a/src/util/md5.h b/src/util/md5.h index b1a4791..f0a0785 100644 --- a/src/util/md5.h +++ b/src/util/md5.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * md5.h: MD5 computation */ diff --git a/src/util/mutex.h b/src/util/mutex.h index 7d21493..a8ec975 100644 --- a/src/util/mutex.h +++ b/src/util/mutex.h @@ -10,6 +10,8 @@ * See http://www.wtfpl.net/ for more details. */ +#pragma once + /* * mutex.h: very simple spinlock routines */