Skip to content

Commit 0645017

Browse files
committed
Output errno on error (helps debugging)
1 parent 4809fdc commit 0645017

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ 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
3333
echo "LDFLAGS=-L$opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV
@@ -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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
8282
if (res == (size_t)-1) {
8383
if (errno == EILSEQ) {
8484
/* GNU iconv: an untranslatable character was met */
85+
/* FIXME: when using the vcpkg port of GNU iconv under an
86+
MSVC debug build, the value of errno remains 0... */
8587
*ascii_ptr = ASCII_SUBST_CHAR;
8688
++ebcdic_ptr; ++ascii_ptr;
8789
--ascii_size;

0 commit comments

Comments
 (0)