From 5597336a51a3be498b1e036d5204d9e0f4586b7e Mon Sep 17 00:00:00 2001 From: Konstantin Kushnir Date: Sun, 26 May 2024 00:50:41 +0000 Subject: [PATCH] Fix build without c-pages, but with c-fsindex --- .github/workflows/linux-build.yml | 9 ++++++--- ChangeLog | 1 + generic/fsindexIO.c | 4 ++++ generic/fsindexIO.h | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index f6ebc89..3a2f6e3 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -18,13 +18,16 @@ jobs: configure: "--disable-c-pkgconfig --disable-c-pages --disable-c-fsindex --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" description: "no pkgcfg, pages, fsindex, readedchannel, writer, writerchannel, vfs" - compiler: gcc - configure: "--disable-c-pages --disable-c-fsindex --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" + configure: "--disable-c-pages --disable-c-fsindex --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" description: "no pages, fsindex, readedchannel, writer, writerchannel, vfs" - compiler: gcc - configure: "--disable-c-fsindex --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" + configure: "--disable-c-pages --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" + description: "no pages, readedchannel, writer, writerchannel, vfs" + - compiler: gcc + configure: "--disable-c-fsindex --disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" description: "no fsindex, readedchannel, writer, writerchannel, vfs" - compiler: gcc - configure: "--disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" + configure: "--disable-c-readerchannel --disable-c-writer --disable-c-writerchannel --disable-c-vfs" description: "no readedchannel, writer, writerchannel, vfs" - compiler: gcc configure: " --disable-c-writer --disable-c-writerchannel --disable-c-vfs" diff --git a/ChangeLog b/ChangeLog index ac4db4b..db3b341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2024-05-26 Konstantin Kushnir * Add tests for writer + * Fix build without c-pages, but with c-fsindex 2024-05-25 Konstantin Kushnir * Add support for writer in C diff --git a/generic/fsindexIO.c b/generic/fsindexIO.c index 1b39fac..caaf4eb 100644 --- a/generic/fsindexIO.c +++ b/generic/fsindexIO.c @@ -76,6 +76,8 @@ Tcl_Obj *Cookfs_FsindexToObject(Cookfs_Fsindex *fsIndex) { return result; } +#ifdef COOKFS_USECPAGES + /* *---------------------------------------------------------------------- * @@ -127,6 +129,8 @@ Cookfs_Fsindex *Cookfs_FsindexFromPages(Cookfs_Fsindex *fsindex, Cookfs_Pages *p return rc; } +#endif /* COOKFS_USECPAGES */ + /* *---------------------------------------------------------------------- * diff --git a/generic/fsindexIO.h b/generic/fsindexIO.h index eb7b83b..80ca7c6 100644 --- a/generic/fsindexIO.h +++ b/generic/fsindexIO.h @@ -8,7 +8,9 @@ Tcl_Obj *Cookfs_FsindexToObject(Cookfs_Fsindex *i); Cookfs_Fsindex *Cookfs_FsindexFromObject(Cookfs_Fsindex *i, Tcl_Obj *o); +#ifdef COOKFS_USECPAGES Cookfs_Fsindex *Cookfs_FsindexFromPages(Cookfs_Fsindex *fsindex, Cookfs_Pages *pages); +#endif /* COOKFS_USECPAGES */ #endif /* COOKFS_USECFSINDEX */