From 6cbc0d855e0e1a73820b0fc2e7a078044872d00b Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 24 Sep 2020 09:06:10 -0700 Subject: [PATCH] Change file including guard from pragma-once to ifndef-define. --- wolfssh/agent.h | 6 +++++- wolfssh/certs_test.h | 6 +++--- wolfssh/error.h | 4 +++- wolfssh/internal.h | 5 ++++- wolfssh/keygen.h | 9 ++++----- wolfssh/log.h | 5 ++++- wolfssh/misc.h | 8 +++----- wolfssh/port.h | 5 ++++- wolfssh/settings.h | 5 ++++- wolfssh/ssh.h | 6 +++++- wolfssh/test.h | 2 +- wolfssh/version.h | 6 +++++- wolfssh/version.h.in | 6 +++++- wolfssh/visibility.h | 5 ++++- wolfssh/wolfscp.h | 8 ++++---- wolfssh/wolfsftp.h | 8 +++++++- 16 files changed, 65 insertions(+), 29 deletions(-) diff --git a/wolfssh/agent.h b/wolfssh/agent.h index a6758eb..fc22cf3 100644 --- a/wolfssh/agent.h +++ b/wolfssh/agent.h @@ -23,7 +23,8 @@ */ -#pragma once +#ifndef _WOLFSSH_AGENT_H_ +#define _WOLFSSH_AGENT_H_ #include #include @@ -188,3 +189,6 @@ WOLFSSH_API int wolfSSH_AGENT_SignRequest(WOLFSSH*, const byte*, word32, #ifdef __cplusplus } #endif + +#endif /* _WOLFSSH_AGENT_H_ */ + diff --git a/wolfssh/certs_test.h b/wolfssh/certs_test.h index 40228ee..c313b76 100644 --- a/wolfssh/certs_test.h +++ b/wolfssh/certs_test.h @@ -18,8 +18,8 @@ * along with wolfSSH. If not, see . */ -#ifndef WOLFSSL_CERTS_TEST_H -#define WOLFSSL_CERTS_TEST_H +#ifndef _WOLFSSH_CERTS_TEST_H_ +#define _WOLFSSH_CERTS_TEST_H_ #if defined(NO_FILESYSTEM) @@ -222,5 +222,5 @@ static const int sizeof_ecc_key_der_521 = sizeof(ecc_key_der_521); #endif /* NO_FILESYSTEM */ -#endif /* WOLFSSL_CERTS_TEST_H */ +#endif /* _WOLFSSL_CERTS_TEST_H_ */ diff --git a/wolfssh/error.h b/wolfssh/error.h index 181d0d7..dd19229 100644 --- a/wolfssh/error.h +++ b/wolfssh/error.h @@ -24,7 +24,8 @@ */ -#pragma once +#ifndef _WOLFSSH_ERROR_H_ +#define _WOLFSSH_ERROR_H_ #include @@ -137,4 +138,5 @@ enum WS_IOerrors { #ifdef __cplusplus } #endif +#endif /* _WOLFSSH_ERROR_H_ */ diff --git a/wolfssh/internal.h b/wolfssh/internal.h index 7ee3f2d..ca92680 100644 --- a/wolfssh/internal.h +++ b/wolfssh/internal.h @@ -25,7 +25,8 @@ */ -#pragma once +#ifndef _WOLFSSH_INTERNAL_H_ +#define _WOLFSSH_INTERNAL_H_ #include #include @@ -900,3 +901,5 @@ enum TerminalModes { } #endif +#endif /* _WOLFSSH_INTERNAL_H_ */ + diff --git a/wolfssh/keygen.h b/wolfssh/keygen.h index 599e557..5e8c53d 100644 --- a/wolfssh/keygen.h +++ b/wolfssh/keygen.h @@ -25,10 +25,8 @@ */ -#pragma once - -#ifndef WOLFSSH_KEYGEN_H -#define WOLFSSH_KEYGEN_H +#ifndef _WOLFSSH_KEYGEN_H_ +#define _WOLFSSH_KEYGEN_H_ #include #include @@ -49,4 +47,5 @@ WOLFSSH_API int wolfSSH_MakeRsaKey(byte*, word32, word32, word32); } #endif -#endif +#endif /* _WOLFSSH_KEYGEN_H_ */ + diff --git a/wolfssh/log.h b/wolfssh/log.h index 54889cd..d8dfaaf 100644 --- a/wolfssh/log.h +++ b/wolfssh/log.h @@ -26,7 +26,8 @@ */ -#pragma once +#ifndef _WOLFSSH_LOG_H_ +#define _WOLFSSH_LOG_H_ #include @@ -80,3 +81,5 @@ WOLFSSH_API void wolfSSH_Log(enum wolfSSH_LogLevel, } #endif +#endif /* _WOLFSSH_LOG_H_ */ + diff --git a/wolfssh/misc.h b/wolfssh/misc.h index 99ee528..f81b0a8 100644 --- a/wolfssh/misc.h +++ b/wolfssh/misc.h @@ -18,10 +18,9 @@ * along with wolfSSH. If not, see . */ -#pragma once -#ifndef WOLFSSH_MISC_H -#define WOLFSSH_MISC_H +#ifndef _WOLFSSH_MISC_H_ +#define _WOLFSSH_MISC_H_ #ifdef __cplusplus @@ -55,6 +54,5 @@ WOLFSSH_LOCAL void CreateMpint(byte*, word32*, byte*); } /* extern "C" */ #endif - -#endif /* WOLFSSH_MISC_H */ +#endif /* _WOLFSSH_MISC_H_ */ diff --git a/wolfssh/port.h b/wolfssh/port.h index 3395a98..a713c99 100644 --- a/wolfssh/port.h +++ b/wolfssh/port.h @@ -27,7 +27,8 @@ */ -#pragma once +#ifndef _WOLFSSH_PORT_H_ +#define _WOLFSSH_PORT_H_ #include #include @@ -1111,3 +1112,5 @@ extern "C" { } #endif +#endif /* _WOLFSSH_PORT_H_ */ + diff --git a/wolfssh/settings.h b/wolfssh/settings.h index 3ec8840..4a07f9b 100644 --- a/wolfssh/settings.h +++ b/wolfssh/settings.h @@ -26,7 +26,8 @@ */ -#pragma once +#ifndef _WOLFSSH_SETTINGS_H_ +#define _WOLFSSH_SETTINGS_H_ #include @@ -75,3 +76,5 @@ extern "C" { } #endif +#endif /* _WOLFSSH_SETTINGS_H_ */ + diff --git a/wolfssh/ssh.h b/wolfssh/ssh.h index 9ac4023..2caf0a1 100644 --- a/wolfssh/ssh.h +++ b/wolfssh/ssh.h @@ -24,7 +24,9 @@ */ -#pragma once +#ifndef _WOLFSSH_SSH_H_ +#define _WOLFSSH_SSH_H_ + #ifdef WOLFSSL_USER_SETTINGS #include @@ -297,3 +299,5 @@ WOLFSSH_API void wolfSSH_ShowSizes(void); } #endif +#endif /* _WOLFSSH_SSH_H_ */ + diff --git a/wolfssh/test.h b/wolfssh/test.h index 64f88e0..80b92e4 100644 --- a/wolfssh/test.h +++ b/wolfssh/test.h @@ -18,7 +18,6 @@ * along with wolfSSH. If not, see . */ -#pragma once #ifndef _WOLFSSH_TEST_H_ #define _WOLFSSH_TEST_H_ @@ -887,3 +886,4 @@ static INLINE void ThreadDetach(THREAD_TYPE thread) #endif /* WOLFSSH_TEST_THREADING */ #endif /* _WOLFSSH_TEST_H_ */ + diff --git a/wolfssh/version.h b/wolfssh/version.h index 9287cdf..eba2efc 100644 --- a/wolfssh/version.h +++ b/wolfssh/version.h @@ -27,7 +27,9 @@ */ -#pragma once +#ifndef _WOLFSSH_VERSION_H_ +#define _WOLFSSH_VERSION_H_ + #ifdef __cplusplus extern "C" { @@ -40,3 +42,5 @@ extern "C" { } #endif +#endif /* _WOLFSSH_VERSION_H_ */ + diff --git a/wolfssh/version.h.in b/wolfssh/version.h.in index 34cf6d8..37738c5 100644 --- a/wolfssh/version.h.in +++ b/wolfssh/version.h.in @@ -27,7 +27,9 @@ */ -#pragma once +#ifndef _WOLFSSH_VERSION_H_ +#define _WOLFSSH_VERSION_H_ + #ifdef __cplusplus extern "C" { @@ -40,3 +42,5 @@ extern "C" { } #endif +#endif /* _WOLFSSH_VERSION_H_ */ + diff --git a/wolfssh/visibility.h b/wolfssh/visibility.h index 86aced2..6f44828 100644 --- a/wolfssh/visibility.h +++ b/wolfssh/visibility.h @@ -26,7 +26,8 @@ */ -#pragma once +#ifndef _WOLFSSH_VISIBILITY_H_ +#define _WOLFSSH_VISIBILITY_H_ #ifdef __cplusplus @@ -77,3 +78,5 @@ extern "C" { } #endif +#endif /* _WOLFSSH_VISIBILITY_H_ */ + diff --git a/wolfssh/wolfscp.h b/wolfssh/wolfscp.h index 22e1f03..270584a 100644 --- a/wolfssh/wolfscp.h +++ b/wolfssh/wolfscp.h @@ -18,10 +18,10 @@ * along with wolfSSH. If not, see . */ -#pragma once -#ifndef WOLFSSH_WOLFSCP_H -#define WOLFSSH_WOLFSCP_H +#ifndef _WOLFSSH_WOLFSCP_H_ +#define _WOLFSSH_WOLFSCP_H_ + #include #include @@ -139,5 +139,5 @@ WOLFSSH_API int wolfSSH_SCP_from(WOLFSSH*, const char*, const char*); #endif /* WOLFSSH_SCP */ -#endif /* WOLFSSH_WOLFSCP_H */ +#endif /* _WOLFSSH_WOLFSCP_H_ */ diff --git a/wolfssh/wolfsftp.h b/wolfssh/wolfsftp.h index 5eaea2e..7b95daa 100644 --- a/wolfssh/wolfsftp.h +++ b/wolfssh/wolfsftp.h @@ -18,7 +18,10 @@ * along with wolfSSH. If not, see . */ -#pragma once + +#ifndef _WOLFSSH_WOLFSFTP_H_ +#define _WOLFSSH_WOLFSFTP_H_ + #ifdef WOLFSSL_USER_SETTINGS #include @@ -241,3 +244,6 @@ WOLFSSH_LOCAL void wolfSSH_SFTP_ShowSizes(void); #ifdef __cplusplus } #endif + +#endif /* _WOLFSSH_WOLFSFTP_H_ */ +