summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-04-28 12:19:01 +0200
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-07 21:10:46 +0200
commit3cfc33248efc2414e7ee25260da02bb6fe9c20ea (patch)
tree82b39ba03f3577ff99eae85b1336cbfcf2d13678 /src
parent8a8dbe77dd5c0a0d0809760ab7cebf8bfcdf051f (diff)
downloadgnutls-3cfc33248efc2414e7ee25260da02bb6fe9c20ea.tar.gz
Add or clean header guards in src/
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/benchmark.h5
-rw-r--r--src/certtool-cfg.h5
-rw-r--r--src/certtool-common.h6
-rw-r--r--src/common.h6
-rwxr-xr-xsrc/inline_cmds.h5
-rw-r--r--src/list.h9
-rw-r--r--src/ocsptool-common.h6
-rw-r--r--src/p11tool.h6
-rw-r--r--src/tests.h5
-rw-r--r--src/udp-serv.h5
10 files changed, 41 insertions, 17 deletions
diff --git a/src/benchmark.h b/src/benchmark.h
index f449a576ed..2152e6edcf 100644
--- a/src/benchmark.h
+++ b/src/benchmark.h
@@ -17,6 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#ifndef GNUTLS_SRC_BENCHMARK_H
+#define GNUTLS_SRC_BENCHMARK_H
+
#include <sys/time.h>
#include <time.h>
#include <signal.h>
@@ -67,3 +70,5 @@ timespec_sub_ms(struct timespec *a, struct timespec *b)
{
return (a->tv_sec - b->tv_sec) * 1000 + (a->tv_nsec - b->tv_nsec) / (1000 * 1000);
}
+
+#endif /* GNUTLS_SRC_BENCHMARK_H */
diff --git a/src/certtool-cfg.h b/src/certtool-cfg.h
index 6a4be91e6f..c23ff5b0b0 100644
--- a/src/certtool-cfg.h
+++ b/src/certtool-cfg.h
@@ -20,6 +20,9 @@
* Written by Nikos Mavrogiannopoulos <nmav@gnutls.org>.
*/
+#ifndef GNUTLS_SRC_CERTTOOL_CFG_H
+#define GNUTLS_SRC_CERTTOOL_CFG_H
+
#include <stdbool.h>
#include <stdint.h>
#include <gnutls/x509.h>
@@ -103,3 +106,5 @@ void get_oid_crq_set(gnutls_x509_crq_t crq);
const char *get_proxy_policy(char **policy, size_t * policylen);
void crq_extensions_set(gnutls_x509_crt_t crt, gnutls_x509_crq_t crq);
+
+#endif /* GNUTLS_SRC_CERTTOOL_CFG_H */
diff --git a/src/certtool-common.h b/src/certtool-common.h
index 9e423c0493..a4b4c5867f 100644
--- a/src/certtool-common.h
+++ b/src/certtool-common.h
@@ -19,8 +19,8 @@
* <https://www.gnu.org/licenses/>.
*/
-#ifndef CERTTOOL_COMMON_H
-#define CERTTOOL_COMMON_H
+#ifndef GNUTLS_SRC_CERTTOOL_COMMON_H
+#define GNUTLS_SRC_CERTTOOL_COMMON_H
#include <gnutls/x509.h>
#include <stdio.h>
@@ -193,4 +193,4 @@ gnutls_digest_algorithm_t hash_to_id(const char *hash);
void sign_params_to_flags(common_info_st *cinfo, const char *params);
-#endif
+#endif /* GNUTLS_SRC_CERTTOOL_COMMON_H */
diff --git a/src/common.h b/src/common.h
index 91b9ed04f2..40f16451ae 100644
--- a/src/common.h
+++ b/src/common.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#ifndef INCLUDE_COMMON_H
-# define INCLUDE_COMMON_H
+#ifndef GNUTLS_SRC_COMMON_H
+#define GNUTLS_SRC_COMMON_H
#define SERVER "127.0.0.1"
@@ -144,4 +144,4 @@ void set_read_funcs(gnutls_session_t session)
# define set_read_funcs(x)
#endif
-#endif
+#endif /* GNUTLS_SRC_COMMON_H */
diff --git a/src/inline_cmds.h b/src/inline_cmds.h
index b773172345..2705a8cc30 100755
--- a/src/inline_cmds.h
+++ b/src/inline_cmds.h
@@ -17,6 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#ifndef GNUTLS_SRC_INLINE_CMDS_H
+#define GNUTLS_SRC_INLINE_CMDS_H
+
/*
* The inline commands is a facility that can be used optionally
* when --inline-commands is set during invocation of gnutls-cli
@@ -73,3 +76,5 @@ struct inline_command_definitions inline_commands_def[] = {
};
#define NUM_INLINE_COMMANDS ((unsigned)(sizeof(inline_commands_def)/sizeof(inline_commands_def[0])))
+
+#endif /* GNUTLS_SRC_INLINE_CMDS_H */
diff --git a/src/list.h b/src/list.h
index 138f6d476d..967eb193e2 100644
--- a/src/list.h
+++ b/src/list.h
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#ifndef GNUTLS_SRC_LIST_H
+#define GNUTLS_SRC_LIST_H
+
/*
SOAP:
@@ -123,10 +126,6 @@ int main (int argc, char **argv)
*/
-
-#ifndef _LIST_H
-#define _LIST_H
-
/* the `search' member points to the last found.
this speeds up repeated searches on the same list-item,
the consecutive list-item, or the pre-consecutive list-item.
@@ -444,4 +443,4 @@ struct list {
free (__t); \
} \
-#endif /* _LIST_H */
+#endif /* GNUTLS_SRC_LIST_H */
diff --git a/src/ocsptool-common.h b/src/ocsptool-common.h
index eda4adbc8b..76f16b0b92 100644
--- a/src/ocsptool-common.h
+++ b/src/ocsptool-common.h
@@ -18,8 +18,8 @@
* <https://www.gnu.org/licenses/>.
*/
-#ifndef OCSPTOOL_COMMON_H
-#define OCSPTOOL_COMMON_H
+#ifndef GNUTLS_SRC_OCSPTOOL_COMMON_H
+#define GNUTLS_SRC_OCSPTOOL_COMMON_H
#include <gnutls/ocsp.h>
@@ -45,4 +45,4 @@ check_ocsp_response(gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer,
gnutls_datum_t * data, gnutls_datum_t *nonce,
int verbose);
-#endif
+#endif /* GNUTLS_SRC_OCSPTOOL_COMMON_H */
diff --git a/src/p11tool.h b/src/p11tool.h
index 2a49b7256b..073bc79ca7 100644
--- a/src/p11tool.h
+++ b/src/p11tool.h
@@ -20,8 +20,8 @@
* <https://www.gnu.org/licenses/>.
*/
-#ifndef P11TOOL_H
-#define P11TOOL_H
+#ifndef GNUTLS_SRC_P11TOOL_H
+#define GNUTLS_SRC_P11TOOL_H
#include "certtool-common.h"
@@ -72,4 +72,4 @@ void pkcs11_set_label(FILE * outfile, const char *url, int detailed,
#define PKCS11_TYPE_PRIVKEY 5
#define PKCS11_TYPE_INFO 6
-#endif
+#endif /* GNUTLS_SRC_P11TOOL_H */
diff --git a/src/tests.h b/src/tests.h
index 79032d2175..098c441a8d 100644
--- a/src/tests.h
+++ b/src/tests.h
@@ -18,6 +18,9 @@
* <https://www.gnu.org/licenses/>.
*/
+#ifndef GNUTLS_SRC_TESTS_H
+#define GNUTLS_SRC_TESTS_H
+
typedef enum {
TEST_SUCCEED, TEST_FAILED, TEST_UNSURE, TEST_IGNORE/*keep socket*/, TEST_IGNORE2/*destroy socket*/
} test_code_t;
@@ -79,3 +82,5 @@ test_code_t test_aes_gcm(gnutls_session_t session);
test_code_t test_aes_ccm(gnutls_session_t session);
test_code_t test_aes_ccm_8(gnutls_session_t session);
test_code_t test_sha256(gnutls_session_t session);
+
+#endif /* GNUTLS_SRC_TESTS_H */
diff --git a/src/udp-serv.h b/src/udp-serv.h
index da8e4570ff..08c88de254 100644
--- a/src/udp-serv.h
+++ b/src/udp-serv.h
@@ -17,6 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#ifndef GNUTLS_SRC_UDP_SERV_H
+#define GNUTLS_SRC_UDP_SERV_H
+
#include <gnutls/dtls.h>
void udp_server(const char *name, int port, int mtu);
@@ -25,3 +28,5 @@ const char *human_addr(const struct sockaddr *sa, socklen_t salen,
char *buf, size_t buflen);
int wait_for_connection(void);
int listen_socket(const char *name, int listen_port, int socktype);
+
+#endif /* GNUTLS_SRC_UDP_SERV_H */