From 1be4042711dcb83bd29f89c7f276340846b82a65 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 24 Sep 2020 16:50:35 -0700 Subject: [PATCH] Change examples' header file including guard from pragma-once to ifndef-define. --- examples/client/client.h | 8 +++----- examples/echoserver/echoserver.h | 8 +++----- examples/portfwd/wolfssh_portfwd.h | 27 +++++++++++++++++++++++---- examples/scpclient/scpclient.h | 8 +++----- examples/server/server.h | 8 +++----- examples/sftpclient/sftpclient.h | 7 ++++--- 6 files changed, 39 insertions(+), 27 deletions(-) diff --git a/examples/client/client.h b/examples/client/client.h index 87599bf..29faac1 100644 --- a/examples/client/client.h +++ b/examples/client/client.h @@ -19,13 +19,11 @@ */ -#pragma once - -#ifndef _WOLFSSH_CLIENT_H_ -#define _WOLFSSH_CLIENT_H_ +#ifndef _WOLFSSH_EXAMPLES_CLIENT_H_ +#define _WOLFSSH_EXAMPLES_CLIENT_H_ THREAD_RETURN WOLFSSH_THREAD client_test(void* args); -#endif /* _WOLFSSH_CLIENT_H_ */ +#endif /* _WOLFSSH_EXAMPLES_CLIENT_H_ */ diff --git a/examples/echoserver/echoserver.h b/examples/echoserver/echoserver.h index a973ee7..99e4080 100644 --- a/examples/echoserver/echoserver.h +++ b/examples/echoserver/echoserver.h @@ -19,13 +19,11 @@ */ -#pragma once - -#ifndef _WOLFSSH_ECHOSERVER_H_ -#define _WOLFSSH_ECHOSERVER_H_ +#ifndef _WOLFSSH_EXAMPLES_ECHOSERVER_H_ +#define _WOLFSSH_EXAMPLES_ECHOSERVER_H_ THREAD_RETURN WOLFSSH_THREAD echoserver_test(void* args); -#endif /* _WOLFSSH_ECHOSERVER_H_ */ +#endif /* _WOLFSSH_EXAMPLES_ECHOSERVER_H_ */ diff --git a/examples/portfwd/wolfssh_portfwd.h b/examples/portfwd/wolfssh_portfwd.h index d7eb5d0..35377b3 100644 --- a/examples/portfwd/wolfssh_portfwd.h +++ b/examples/portfwd/wolfssh_portfwd.h @@ -1,8 +1,27 @@ -#pragma once +/* wolfssh_portfwd.h + * + * Copyright (C) 2014-2020 wolfSSL Inc. + * + * This file is part of wolfSSH. + * + * wolfSSH is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * wolfSSH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with wolfSSH. If not, see . + */ -#ifndef _WOLFSSH_CLIENT_H_ -#define _WOLFSSH_CLIENT_H_ + +#ifndef _WOLFSSH_EXAMPLES_PORTFWD_H_ +#define _WOLFSSH_EXAMPLES_PORTFWD_H_ THREAD_RETURN WOLFSSH_THREAD portfwd_worker(void* args); -#endif /* _WOLFSSH_CLIENT_H_ */ +#endif /* _WOLFSSH_EXAMPLES_PORTFWD_H_ */ diff --git a/examples/scpclient/scpclient.h b/examples/scpclient/scpclient.h index 9ced604..a4a3f4e 100644 --- a/examples/scpclient/scpclient.h +++ b/examples/scpclient/scpclient.h @@ -19,11 +19,9 @@ */ -#pragma once - -#ifndef _WOLFSSH_SCPCLIENT_H_ -#define _WOLFSSH_SCPCLIENT_H_ +#ifndef _WOLFSSH_EXAMPLES_SCPCLIENT_H_ +#define _WOLFSSH_EXAMPLES_SCPCLIENT_H_ THREAD_RETURN WOLFSSH_THREAD scp_client(void*); -#endif /* _WOLFSSH_SCPCLIENT_H_ */ +#endif /* _WOLFSSH_EXAMPLES_SCPCLIENT_H_ */ diff --git a/examples/server/server.h b/examples/server/server.h index 172b962..f7732c9 100644 --- a/examples/server/server.h +++ b/examples/server/server.h @@ -19,13 +19,11 @@ */ -#pragma once - -#ifndef _WOLFSSH_SERVER_H_ -#define _WOLFSSH_SERVER_H_ +#ifndef _WOLFSSH_EXAMPLES_SERVER_H_ +#define _WOLFSSH_EXAMPLES_SERVER_H_ THREAD_RETURN WOLFSSH_THREAD server_test(void* args); -#endif /* _WOLFSSH_SERVER_H_ */ +#endif /* _WOLFSSH_EXAMPLES_SERVER_H_ */ diff --git a/examples/sftpclient/sftpclient.h b/examples/sftpclient/sftpclient.h index b3a7d85..95ac291 100644 --- a/examples/sftpclient/sftpclient.h +++ b/examples/sftpclient/sftpclient.h @@ -19,9 +19,10 @@ */ -#pragma once - - +#ifndef _WOLFSSH_EXAMPLES_SFTPCLIENT_H_ +#define _WOLFSSH_EXAMPLES_SFTPCLIENT_H_ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args); +#endif /* _WOLFSSH_EXAMPLES_SFTPCLIENT_H_ */ +