Skip to content

Commit dee2372

Browse files
committed
Fixups
1 parent 4809fdc commit dee2372

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.github/workflows/macos.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727

2828
- name: Install packages
2929
run: |
30-
brew install automake libtool help2man texinfo bison berkeley-db@4 json-c
30+
brew install automake libtool help2man texinfo bison berkeley-db@4 json-c libiconv
3131
opt="/opt/homebrew/opt"
3232
echo "$opt/pkg-config/bin" >> $GITHUB_PATH
33-
echo "LDFLAGS=-L$opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV
34-
echo "CPPFLAGS=-I$opt/berkeley-db@4/include ${CPPFLAGS}" >> $GITHUB_ENV
33+
echo "LDFLAGS=-L$opt/berkeley-db@4/lib -L$opt/libiconv/lib ${LDFLAGS}" >> $GITHUB_ENV
34+
echo "CPPFLAGS=-I$opt/berkeley-db@4/include -I$opt/libiconv/include ${CPPFLAGS}" >> $GITHUB_ENV
3535
3636
- name: Set git user
3737
run: |
@@ -41,6 +41,7 @@ jobs:
4141
- name: bootstrap
4242
run: |
4343
./build_aux/bootstrap install
44+
gettextize -f
4445
4546
- name: Build environment setup
4647
run: |

.github/workflows/windows-msvc.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ jobs:
136136
}) -join "`r`n" ) | Set-Content -Path 'config.h'
137137
& .\maketarstamp.ps1 > tarstamp.h
138138
139+
- name: Disable iconv for debug builds
140+
if: ${{ matrix.target == 'Debug' }}
141+
shell: pwsh
142+
run: |
143+
cd build_windows
144+
((Get-Content -Path 'config.h' | ForEach-Object { $_ `
145+
-replace '(#define\s+HAVE_ICONV)\s.+$', '/* #undef HAVE_ICONV */' `
146+
}) -join "`r`n" ) | Set-Content -Path 'config.h'
147+
139148
- name: Generate parser
140149
run: |
141150
set PATH=%GITHUB_WORKSPACE%\flexbison;%PATH%
@@ -220,13 +229,13 @@ jobs:
220229
echo wrap up GnuCBOBOL binary package
221230
rem set CL=
222231
cmd /C build_windows\makedist.cmd ${{ matrix.target }} <NUL
223-
232+
224233
- name: Upload dependencies
225234
uses: actions/upload-artifact@v4
226235
with:
227236
name: VCPKG ${{ matrix.arch }}-${{ matrix.target }} dependencies
228237
path: dependencies-${{ matrix.arch }}.7z
229-
238+
230239
- name: Upload distribution
231240
uses: actions/upload-artifact@v4
232241
with:

cobc/gentable.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "tree.h" /* for cb_note */
2424

2525
#include <stdio.h>
26+
#include <string.h>
2627

2728
#ifdef HAVE_ICONV
2829

@@ -82,6 +83,8 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
8283
if (res == (size_t)-1) {
8384
if (errno == EILSEQ) {
8485
/* GNU iconv: an untranslatable character was met */
86+
/* FIXME: when using the vcpkg port of GNU iconv under an
87+
MSVC debug build, the value of errno remains 0... */
8588
*ascii_ptr = ASCII_SUBST_CHAR;
8689
++ebcdic_ptr; ++ascii_ptr;
8790
--ascii_size;

0 commit comments

Comments
 (0)