diff --git a/IDE/ROWLEY-CROSSWORKS-ARM/hw.h b/IDE/ROWLEY-CROSSWORKS-ARM/hw.h index 1461f59bc..134193ca8 100644 --- a/IDE/ROWLEY-CROSSWORKS-ARM/hw.h +++ b/IDE/ROWLEY-CROSSWORKS-ARM/hw.h @@ -1,4 +1,7 @@ -#pragma once + +#ifndef WOLFSSL_ROWLEY_HW_H +#define WOLFSSL_ROWLEY_HW_H + #include <__cross_studio_io.h> #include <__libc.h> @@ -11,3 +14,7 @@ uint32_t hw_get_time_msec(void); void hw_uart_printchar(int c); void hw_watchdog_disable(void); uint32_t hw_rand(void); + + +#endif /* WOLFSSL_ROWLEY_HW_H */ + diff --git a/configure.ac b/configure.ac index a495b2234..949852207 100644 --- a/configure.ac +++ b/configure.ac @@ -2581,7 +2581,9 @@ echo " *" >> $OPTION_FILE echo " */" >> $OPTION_FILE echo "" >> $OPTION_FILE -echo "#pragma once" >> $OPTION_FILE +echo "#ifndef WOLFSSL_OPTIONS_H" >> $OPTION_FILE +echo "#define WOLFSSL_OPTIONS_H" >> $OPTION_FILE +echo "" >> $OPTION_FILE echo "" >> $OPTION_FILE echo "#ifdef __cplusplus" >> $OPTION_FILE echo "extern \"C\" {" >> $OPTION_FILE @@ -2627,6 +2629,9 @@ echo "#ifdef __cplusplus" >> $OPTION_FILE echo "}" >> $OPTION_FILE echo "#endif" >> $OPTION_FILE echo "" >> $OPTION_FILE +echo "" >> $OPTION_FILE +echo "#endif /* WOLFSSL_OPTIONS_H */" >> $OPTION_FILE +echo "" >> $OPTION_FILE echo #backwards compatability for those who have included options or version @@ -2640,6 +2645,10 @@ do echo "$line" >> cyassl/options.h done < $OPTION_FILE +# switch ifdef protection in cyassl/option.h to CYASSL_OPTONS_H, remove bak +sed -i.bak 's/WOLFSSL_OPTIONS_H/CYASSL_OPTIONS_H/g' cyassl/options.h +rm cyassl/options.h.bak + # output config summary echo "---" echo "Configuration summary for $PACKAGE_NAME version $VERSION" diff --git a/cyassl/options.h.in b/cyassl/options.h.in index d1e362c20..523be8c57 100644 --- a/cyassl/options.h.in +++ b/cyassl/options.h.in @@ -21,7 +21,9 @@ /* default blank options for autoconf */ -#pragma once +#ifndef CYASSL_OPTIONS_H +#define CYASSL_OPTIONS_H + #ifdef __cplusplus extern "C" { @@ -32,3 +34,6 @@ extern "C" { } #endif + +#endif /* CYASSL_OPTIONS_H */ + diff --git a/examples/client/client.h b/examples/client/client.h index 25881aab8..5efefe993 100644 --- a/examples/client/client.h +++ b/examples/client/client.h @@ -19,15 +19,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFSSL_CLIENT_H +#define WOLFSSL_CLIENT_H + THREAD_RETURN WOLFSSL_THREAD client_test(void* args); -/* Measures average time to create, connect and disconnect a connection (TPS). +/* Measures average time to create, connect and disconnect a connection (TPS). Benchmark = number of connections. */ -int ClientBenchmarkConnections(WOLFSSL_CTX* ctx, char* host, word16 port, +int ClientBenchmarkConnections(WOLFSSL_CTX* ctx, char* host, word16 port, int doDTLS, int benchmark, int resumeSession); -/* Measures throughput in kbps. Throughput = number of bytes */ -int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, +/* Measures throughput in kbps. Throughput = number of bytes */ +int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port, int doDTLS, int throughput); + + +#endif /* WOLFSSL_CLIENT_H */ + diff --git a/examples/echoclient/echoclient.h b/examples/echoclient/echoclient.h index d945edb4a..0498c69ed 100644 --- a/examples/echoclient/echoclient.h +++ b/examples/echoclient/echoclient.h @@ -19,5 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFSSL_ECHOCLIENT_H +#define WOLFSSL_ECHOCLIENT_H + + void echoclient_test(void* args); + + +#endif /* WOLFSSL_ECHOCLIENT_H */ + diff --git a/examples/echoserver/echoserver.h b/examples/echoserver/echoserver.h index 2f0d88d3d..6fc153564 100644 --- a/examples/echoserver/echoserver.h +++ b/examples/echoserver/echoserver.h @@ -19,6 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFSSL_ECHOSERVER_H +#define WOLFSSL_ECHOSERVER_H + THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args); + + +#endif /* WOLFSSL_ECHOSERVER_H */ + diff --git a/examples/server/server.h b/examples/server/server.h index 3cba4c004..bfd6a14f1 100644 --- a/examples/server/server.h +++ b/examples/server/server.h @@ -19,10 +19,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFSSL_SERVER_H +#define WOLFSSL_SERVER_H + THREAD_RETURN WOLFSSL_THREAD server_test(void* args); /* Echo bytes using buffer of TEST_BUFFER_SIZE until [echoData] bytes are complete. */ /* If [bechmarkThroughput] set the statistcs will be output at the end */ int ServerEchoData(WOLFSSL* ssl, int clientfd, int echoData, int benchmarkThroughput); + + +#endif /* WOLFSSL_SERVER_H */ + diff --git a/wolfcrypt/benchmark/benchmark.h b/wolfcrypt/benchmark/benchmark.h index 3905eebf7..b916229d3 100644 --- a/wolfcrypt/benchmark/benchmark.h +++ b/wolfcrypt/benchmark/benchmark.h @@ -19,7 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFCRYPT_BENCHMARK_H +#define WOLFCRYPT_BENCHMARK_H + #ifdef __cplusplus extern "C" { @@ -30,3 +32,7 @@ int benchmark_test(void* args); #ifdef __cplusplus } /* extern "C" */ #endif + + +#endif /* WOLFCRYPT_BENCHMARK_H */ + diff --git a/wolfcrypt/test/test.h b/wolfcrypt/test/test.h index 6f9b6bd14..53f299454 100644 --- a/wolfcrypt/test/test.h +++ b/wolfcrypt/test/test.h @@ -19,7 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#pragma once +#ifndef WOLFCRYPT_TEST_H +#define WOLFCRYPT_TEST_H + #ifdef __cplusplus extern "C" { @@ -31,3 +33,6 @@ int wolfcrypt_test(void* args); } /* extern "C" */ #endif + +#endif /* WOLFCRYPT_TEST_H */ + diff --git a/wolfssl/options.h.in b/wolfssl/options.h.in index d1e362c20..2043cbbf7 100644 --- a/wolfssl/options.h.in +++ b/wolfssl/options.h.in @@ -21,7 +21,9 @@ /* default blank options for autoconf */ -#pragma once +#ifndef WOLFSSL_OPTIONS_H +#define WOLFSSL_OPTIONS_H + #ifdef __cplusplus extern "C" { @@ -32,3 +34,6 @@ extern "C" { } #endif + +#endif /* WOLFSSL_OPTIONS_H */ + diff --git a/wolfssl/version.h b/wolfssl/version.h index 831ac42c3..48bc23d52 100644 --- a/wolfssl/version.h +++ b/wolfssl/version.h @@ -19,8 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef WOLFSSL_VERSION_H +#define WOLFSSL_VERSION_H -#pragma once #ifdef __cplusplus extern "C" { @@ -33,3 +34,6 @@ extern "C" { } #endif + +#endif /* WOLFSSL_VERSION_H */ + diff --git a/wolfssl/version.h.in b/wolfssl/version.h.in index 966ff5a6f..cc3c5e30f 100644 --- a/wolfssl/version.h.in +++ b/wolfssl/version.h.in @@ -19,8 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef WOLFSSL_VERSION_H +#define WOLFSSL_VERSION_H -#pragma once #ifdef __cplusplus extern "C" { @@ -33,3 +34,6 @@ extern "C" { } #endif + +#endif /* WOLFSSL_VERSION_H */ +