Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Nov 8, 2024
1 parent b1c6f7d commit 705dffc
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/cmake-open-watcom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms

on:
push:
branches: [ "cmake" ]
pull_request:
branches: [ "cmake" ]
workflow_dispatch:

jobs:
build:
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
build_type: [Release]
os: [Windows, OS2, Linux]
include:
- image: 'windows-latest'
dirsep: ';'
owimage: '2.0'
- image: 'ubuntu-latest'
dirsep: ':'
owimage: '2.0'
- image: 'macos-14'
dirsep: ':'
owimage: '2.0-64'
runs-on: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- name: Install Open Watcom
uses: open-watcom/setup-watcom@v0
with:
version: ${{ matrix.owimage }}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B build -S wolfssl/src -G "Watcom WMake" -D CMAKE_SYSTEM_NAME=${{ matrix.os }} -D CMAKE_SYSTEM_PROCESSOR=x86
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake -B build -S wolfssl/src -G "Watcom WMake" --config ${{ matrix.build_type }}
15 changes: 14 additions & 1 deletion wolfssl/wolfcrypt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,19 @@ typedef struct w64wrapper {
typedef unsigned int THREAD_RETURN;
typedef TaskHandle_t THREAD_TYPE;
#define WOLFSSL_THREAD
#elif defined(__WATCOMC__)
typedef unsigned THREAD_RETURN;
typedef uintptr_t THREAD_TYPE;
typedef struct COND_TYPE {
wolfSSL_Mutex mutex;
HANDLE cond;
} COND_TYPE;
#define WOLFSSL_COND
#define INVALID_THREAD_VAL ((THREAD_TYPE)(INVALID_HANDLE_VALUE))
#if defined(USE_WINDOWS_API)
#define WOLFSSL_THREAD __stdcall
#endif
#define WOLFSSL_THREAD_NO_JOIN __watcall
#elif defined(USE_WINDOWS_API)
typedef unsigned THREAD_RETURN;
typedef uintptr_t THREAD_TYPE;
Expand Down Expand Up @@ -1613,7 +1626,7 @@ typedef struct w64wrapper {
/* Create a thread that will be automatically cleaned up. We can't
* return a handle/pointer to the new thread because there are no
* guarantees for how long it will be valid. */
typedef THREAD_RETURN (WOLFSSL_THREAD_NO_JOIN *THREAD_CB_NOJOIN)
typedef void (WOLFSSL_THREAD_NO_JOIN *THREAD_CB_NOJOIN)
(void* arg);
WOLFSSL_API int wolfSSL_NewThreadNoJoin(THREAD_CB_NOJOIN cb,
void* arg);
Expand Down

0 comments on commit 705dffc

Please sign in to comment.