Skip to content

Commit

Permalink
test: define uint_max
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Feb 15, 2024
1 parent dddf71a commit 56374e7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/r2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: r2

on: [push, pull_request]

jobs:
test: # make sure the action works on a clean machine without building
name: ${{ matrix.os.name }} ${{ matrix.os.architecture }} ${{ matrix.os.version }} on ${{ matrix.os.host }}
runs-on: ${{ matrix.os.host }}
strategy:
fail-fast: false
matrix:
os:
- name: openbsd
architecture: x86-64
version: '7.4'
host: ubuntu-latest
steps:
- name: ${{ matrix.os.name }}
uses: cross-platform-actions/action@v0.22.0
env:
FOO: A
BAR: B
with:
environment_variables: FOO BAR
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: '${{ matrix.os.version }}'
shell: bash
run: |
uname -a
echo $SHELL
pwd
ls -lah
whoami
env | sort
sudo pkg_add git
git clone https://github.com/hyoklee/hdf4-1 hdf4
cd hdf4
sudo pkg_add cmake
sudo pkg_add jpeg
mkdir build
cd build
cmake -DHDF4_BUILD_FORTRAN:BOOL=OFF ..
make
make test
4 changes: 4 additions & 0 deletions hdf/test/bitio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#define TESTFILE_NAME "tbitio.hdf"
#define DATAFILE_NAME "test_files/bitio.dat"

#ifndef UINT_MAX
#define UINT_MAX (unsigned)(-1)
#endif /* UINT_MAX */

#ifndef RAND_MAX
#define RAND_MAX (UINT_MAX)
#endif
Expand Down

0 comments on commit 56374e7

Please sign in to comment.