Skip to content

Commit

Permalink
Testing designated initializers with Open Watcom.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstien committed Jan 5, 2024
1 parent b6834ad commit 4251375
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ jobs:
case ${{ matrix.platform.name }} in
msdos*)
echo CC=wcl386 >> $GITHUB_ENV
echo AR=wlib >> $GITHUB_ENV
echo "INCLUDE=$WATCOM/h" >> $GITHUB_ENV
echo "LIB=$WATCOM/lib386" >> $GITHUB_ENV
echo "PATH=$WATCOM/binl:$WATCOM/binw:$PATH" >> $GITHUB_ENV
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ INSTALLDIR ?= /usr/local/bin

# Detect Watcom compiler
ifneq (,$(findstring wc,$(firstword $(CC))))
CFLAGS = -d0 -ox -za99 -zq -c -i="$(CURDIR)/include" -fo=
CFLAGS = -d0 -ox -zastd=c99 -aa -zq -c -i="$(CURDIR)/include" -fo=
LDFLAGS = -zq -l=pmodew -fe=
ARFLAGS =
AR = wlib
ARFLAGS = -q
EXESUFFIX = .exe
LIBSUFFIX = .lib
# Detect Mingw compiler
Expand Down
7 changes: 6 additions & 1 deletion src/lib/stunpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ const char *stpk_versionStr(stpk_Version version)

stpk_Context stpk_init(stpk_Version version, int maxPasses, int verbosity, stpk_LogCallback logCallback, stpk_AllocCallback allocCallback, stpk_DeallocCallback deallocCallback)
{
stpk_Buffer empty = { NULL, 0, 0 };
stpk_Buffer empty = {
.data = NULL,
.offset = 0,
.len = 0
};

// Open Watcom does not support designated initializers with struct values (2024-01-06)
stpk_Context ctx;
ctx.src = empty;
ctx.dst = empty;
Expand Down

0 comments on commit 4251375

Please sign in to comment.