Skip to content

db: add missing header for "grn_fopen()" - #1811

Merged
kou merged 2 commits into
mainfrom
add-missing-header
Jul 3, 2024
Merged

kou merged 2 commits into
mainfrom
add-missing-header

Conversation

@komainu8

@komainu8 komainu8 commented Jul 3, 2024 •

Copy link
Copy Markdown
Member

GitHub: fix GH-1810

"grn_fopen()" is defined as "_fsopen()" in Windows.

We can specify "shflag" in the third argument of "_fsopen()". We use "shflg" in "_fsopen()".

We need to include "share.h" to use "shflag".
See: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fsopen-wfsopen?view=msvc-160

However, db.c does not include "share.h".
So, "error C2065: '_SH_DENYNO': undeclared identifier" occur.

This problem only occur in Groonga for Windows.
Because "fopen()" does not have "shflag".
("grn_fopen()" is defined "fopen()" in Linux.)

komainu8 added 2 commits July 3, 2024 11:16
"grn_fopen()" is defined "_fsopen()" in Windows.

We can specify "shflag" in the third argument of "_fsopen()".
We use "shflg" in "_fsopen()".

We need to include "share.h" to use "shflag".
See: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fsopen-wfsopen?view=msvc-160

However, db.c does not include "share.h".
So, "error C2065: '_SH_DENYNO': undeclared identifier" occur.

This problem only occur in Groonga for Windows.
Because "fopen()" does not have "shflag".
("grn_fopen()" is defined "fopen()" in Linux.)
@kou
kou merged commit bbfce68 into main Jul 3, 2024
@kou
kou deleted the add-missing-header branch July 3, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build of Groonga of main buranch fail on Windows

2 participants