* current git Fails to compile on Solaris 11 x86 @ 2024-03-20 4:41 Clinton Bunch 2024-03-20 9:30 ` Peter Stephenson 0 siblings, 1 reply; 8+ messages in thread From: Clinton Bunch @ 2024-03-20 4:41 UTC (permalink / raw) To: zsh-workers ./configure --prefix=$HOME/local Solaris 11/Developer Studio 12 Src/Modules/hlgroup.c cc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -DHAVE_CONFIG_H -DMODULE -O -KPIC -o hlgroup..o hlgroup.c "hlgroup.c", line 144: void function cannot return value "hlgroup.c", line 158: void function cannot return value cc: acomp failed for hlgroup.c ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 4:41 current git Fails to compile on Solaris 11 x86 Clinton Bunch @ 2024-03-20 9:30 ` Peter Stephenson 2024-03-20 10:19 ` Peter Stephenson 0 siblings, 1 reply; 8+ messages in thread From: Peter Stephenson @ 2024-03-20 9:30 UTC (permalink / raw) To: Clinton Bunch, zsh-workers > On 20/03/2024 04:41 GMT Clinton Bunch <cdb_zsh@zentaur.org> wrote: > ./configure --prefix=$HOME/local > Solaris 11/Developer Studio 12 > Src/Modules/hlgroup.c > > > cc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -DHAVE_CONFIG_H > -DMODULE -O -KPIC -o hlgroup..o hlgroup.c > "hlgroup.c", line 144: void function cannot return value > "hlgroup.c", line 158: void function cannot return value > cc: acomp failed for hlgroup.c Is the function name getpmsgr perhaps already used by Solaris? pws ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 9:30 ` Peter Stephenson @ 2024-03-20 10:19 ` Peter Stephenson 2024-03-20 12:21 ` Clinton Bunch 0 siblings, 1 reply; 8+ messages in thread From: Peter Stephenson @ 2024-03-20 10:19 UTC (permalink / raw) To: Clinton Bunch, zsh-workers > On 20/03/2024 09:30 GMT Peter Stephenson <p.w.stephenson@ntlworld.com> wrote: > > On 20/03/2024 04:41 GMT Clinton Bunch <cdb_zsh@zentaur.org> wrote: > > ./configure --prefix=$HOME/local > > Solaris 11/Developer Studio 12 > > Src/Modules/hlgroup.c > > > > > > cc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -DHAVE_CONFIG_H > > -DMODULE -O -KPIC -o hlgroup..o hlgroup.c > > "hlgroup.c", line 144: void function cannot return value > > "hlgroup.c", line 158: void function cannot return value > > cc: acomp failed for hlgroup.c > > Is the function name getpmsgr perhaps already used by Solaris? The Interweb thing isn't particularly forthcoming on the subject, but I can see a STREAMS function getpmsg() - Receive next message from a STREAMS file. I wonder if this is a re-entrant version of that. Let's just rename it and the others in that area. pws diff --git a/Src/Modules/hlgroup.c b/Src/Modules/hlgroup.c index 6382f32..60f0254 100644 --- a/Src/Modules/hlgroup.c +++ b/Src/Modules/hlgroup.c @@ -128,35 +128,35 @@ scangroup(ScanFunc func, int flags, int sgr) } /**/ static HashNode -getpmesc(UNUSED(HashTable ht), const char *name) +getpmzleesc(UNUSED(HashTable ht), const char *name) { return getgroup(name, 0); } /**/ static void -scanpmesc(UNUSED(HashTable ht), ScanFunc func, int flags) +scanpmzleesc(UNUSED(HashTable ht), ScanFunc func, int flags) { return scangroup(func, flags, 0); } /**/ static HashNode -getpmsgr(UNUSED(HashTable ht), const char *name) +getpmzlesgr(UNUSED(HashTable ht), const char *name) { return getgroup(name, 1); } /**/ static void -scanpmsgr(UNUSED(HashTable ht), ScanFunc func, int flags) +scanpmzlesgr(UNUSED(HashTable ht), ScanFunc func, int flags) { return scangroup(func, flags, 1); } static struct paramdef partab[] = { - SPECIALPMDEF(".zle.esc", PM_READONLY_SPECIAL, 0, getpmesc, scanpmesc), - SPECIALPMDEF(".zle.sgr", PM_READONLY_SPECIAL, 0, getpmsgr, scanpmsgr) + SPECIALPMDEF(".zle.esc", PM_READONLY_SPECIAL, 0, getpmzleesc, scanpmzleesc), + SPECIALPMDEF(".zle.sgr", PM_READONLY_SPECIAL, 0, getpmzlesgr, scanpmzlesgr) }; static struct features module_features = { ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 10:19 ` Peter Stephenson @ 2024-03-20 12:21 ` Clinton Bunch 2024-03-20 14:54 ` Bart Schaefer 0 siblings, 1 reply; 8+ messages in thread From: Clinton Bunch @ 2024-03-20 12:21 UTC (permalink / raw) To: zsh-workers On 3/20/2024 05:19, Peter Stephenson wrote: >> On 20/03/2024 09:30 GMT Peter Stephenson <p.w.stephenson@ntlworld.com> wrote: >>> On 20/03/2024 04:41 GMT Clinton Bunch <cdb_zsh@zentaur.org> wrote: >>> ./configure --prefix=$HOME/local >>> Solaris 11/Developer Studio 12 >>> Src/Modules/hlgroup.c >>> >>> >>> cc -c -I. -I../../Src -I../../Src -I../../Src/Zle -I. -DHAVE_CONFIG_H >>> -DMODULE -O -KPIC -o hlgroup..o hlgroup.c >>> "hlgroup.c", line 144: void function cannot return value >>> "hlgroup.c", line 158: void function cannot return value >>> cc: acomp failed for hlgroup.c >> Is the function name getpmsgr perhaps already used by Solaris? > The Interweb thing isn't particularly forthcoming on the subject, but I > can see a STREAMS function getpmsg() - Receive next message from a > STREAMS file. I wonder if this is a re-entrant version of that. > > Let's just rename it and the others in that area. > > pws > I'm getting the same error with that patch applied. What I saw on the lines it errored on were return statements returning the value of a function in a wrapper function defined to return void. Perhaps, simply removing the return keyword? Doing so, it compiles cleanly, I'm just not familiar enough with the code in question to be sure if that is the right move. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 12:21 ` Clinton Bunch @ 2024-03-20 14:54 ` Bart Schaefer 2024-03-20 15:05 ` Clinton Bunch 0 siblings, 1 reply; 8+ messages in thread From: Bart Schaefer @ 2024-03-20 14:54 UTC (permalink / raw) To: Clinton Bunch; +Cc: zsh-workers On Wed, Mar 20, 2024 at 5:22 AM Clinton Bunch <cdb_zsh@zentaur.org> wrote: > > On 3/20/2024 05:19, Peter Stephenson wrote: > > > > Let's just rename it and the others in that area. > > > I'm getting the same error with that patch applied. What I saw on the > lines it errored on were return statements returning the value of a > function in a wrapper function defined to return void. Perhaps, simply > removing the return keyword? Yes, just removing the "return" from the void function is all that's needed. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 14:54 ` Bart Schaefer @ 2024-03-20 15:05 ` Clinton Bunch 2024-03-20 16:15 ` Peter Stephenson 0 siblings, 1 reply; 8+ messages in thread From: Clinton Bunch @ 2024-03-20 15:05 UTC (permalink / raw) To: zsh-workers On 3/20/2024 9:54 AM, Bart Schaefer wrote: > On Wed, Mar 20, 2024 at 5:22 AM Clinton Bunch <cdb_zsh@zentaur.org> wrote: >> On 3/20/2024 05:19, Peter Stephenson wrote: >>> Let's just rename it and the others in that area. >>> >> I'm getting the same error with that patch applied. What I saw on the >> lines it errored on were return statements returning the value of a >> function in a wrapper function defined to return void. Perhaps, simply >> removing the return keyword? > Yes, just removing the "return" from the void function is all that's needed. What I was unsure of was whether removing the return or changing the type of the wrapper function was the appropriate fix. That would require more familiarity with the code than I have (or at this time want to put in the effort to get) to answer. I mostly wanted to make others aware of the problem. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 15:05 ` Clinton Bunch @ 2024-03-20 16:15 ` Peter Stephenson 2024-03-20 22:26 ` Oliver Kiddle 0 siblings, 1 reply; 8+ messages in thread From: Peter Stephenson @ 2024-03-20 16:15 UTC (permalink / raw) To: Clinton Bunch, zsh-workers > On 20/03/2024 15:05 GMT Clinton Bunch <cdb_zsh@zentaur.org> wrote: > > > On 3/20/2024 9:54 AM, Bart Schaefer wrote: > > On Wed, Mar 20, 2024 at 5:22 AM Clinton Bunch <cdb_zsh@zentaur.org> wrote: > >> On 3/20/2024 05:19, Peter Stephenson wrote: > >>> Let's just rename it and the others in that area. > >>> > >> I'm getting the same error with that patch applied. What I saw on the > >> lines it errored on were return statements returning the value of a > >> function in a wrapper function defined to return void. Perhaps, simply > >> removing the return keyword? > > Yes, just removing the "return" from the void function is all that's needed. > What I was unsure of was whether removing the return or changing the > type of the wrapper function was the appropriate fix. That would > require more familiarity with the code than I have (or at this time want > to put in the effort to get) to answer. I mostly wanted to make others > aware of the problem. The wrapper function just fits a generic form, so should stay void. It's as simple as it looks. (I guess the line numbers were out in the code I was looking at so I misidentified what it was complaining about.) diff --git a/Src/Modules/hlgroup.c b/Src/Modules/hlgroup.c index 6382f32..230f453 100644 --- a/Src/Modules/hlgroup.c +++ b/Src/Modules/hlgroup.c @@ -137,7 +137,7 @@ getpmesc(UNUSED(HashTable ht), const char *name) static void scanpmesc(UNUSED(HashTable ht), ScanFunc func, int flags) { - return scangroup(func, flags, 0); + scangroup(func, flags, 0); } /**/ @@ -151,7 +151,7 @@ getpmsgr(UNUSED(HashTable ht), const char *name) static void scanpmsgr(UNUSED(HashTable ht), ScanFunc func, int flags) { - return scangroup(func, flags, 1); + scangroup(func, flags, 1); } static struct paramdef partab[] = { ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: current git Fails to compile on Solaris 11 x86 2024-03-20 16:15 ` Peter Stephenson @ 2024-03-20 22:26 ` Oliver Kiddle 0 siblings, 0 replies; 8+ messages in thread From: Oliver Kiddle @ 2024-03-20 22:26 UTC (permalink / raw) To: Peter Stephenson; +Cc: Clinton Bunch, zsh-workers Peter Stephenson wrote: > The wrapper function just fits a generic form, so should stay void. > It's as simple as it looks. (I guess the line numbers were out in the > code I was looking at so I misidentified what it was complaining about.) Yes sorry, that fix is right. I still have my git branch and, looking at the steps, I mistakenly copied the same form from the get* functions when factoring out the common code for the .zle.esc and .zle.sgr parameters. Also the following fix is needed for this case: typeset -A .zle.hlgroups zmodload -i zsh/hlgroup : ${.zle.hlgroups[select]} export GREP_COLOR=${.zle.sgr[select]} Oliver diff --git a/Src/Modules/hlgroup.c b/Src/Modules/hlgroup.c index f20f2c1f9..082762623 100644 --- a/Src/Modules/hlgroup.c +++ b/Src/Modules/hlgroup.c @@ -91,7 +91,8 @@ getgroup(const char *name, int sgr) if (!(v = getvalue(&vbuf, &var, 0)) || PM_TYPE(v->pm->node.flags) != PM_HASHED || !(hlg = v->pm->gsu.h->getfn(v->pm)) || - !(hn = gethashnode2(hlg, name))) + !(hn = gethashnode2(hlg, name)) || + (((Param) hn)->node.flags & PM_UNSET)) { pm->u.str = dupstring(""); pm->node.flags |= PM_UNSET; ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-20 22:27 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-20 4:41 current git Fails to compile on Solaris 11 x86 Clinton Bunch 2024-03-20 9:30 ` Peter Stephenson 2024-03-20 10:19 ` Peter Stephenson 2024-03-20 12:21 ` Clinton Bunch 2024-03-20 14:54 ` Bart Schaefer 2024-03-20 15:05 ` Clinton Bunch 2024-03-20 16:15 ` Peter Stephenson 2024-03-20 22:26 ` Oliver Kiddle
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).