zsh-workers
 help / color / Atom feed
* Where is `_' defined?
@ 2019-10-11 11:15 ` Sebastian Gniazdowski
  2019-10-11 11:26   ` Roman Perepelitsa
  2019-10-11 11:30   ` Peter Stephenson
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2019-10-11 11:15 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
I'm trying to compile a part of Zsh. I'm getting the following error:

zsh.h:631:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_’
 typedef void (*voidvoidfnptr_t) _((void));

Trying to find where the underscore is defined is boundary to a
miracle. Could anyone help?
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where is `_' defined?
  2019-10-11 11:15 ` Where is `_' defined? Sebastian Gniazdowski
@ 2019-10-11 11:26   ` Roman Perepelitsa
  2019-10-11 11:50     ` Sebastian Gniazdowski
  2019-10-11 11:30   ` Peter Stephenson
  1 sibling, 1 reply; 5+ messages in thread
From: Roman Perepelitsa @ 2019-10-11 11:26 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh hackers list

On Fri, Oct 11, 2019 at 1:16 PM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> Trying to find where the underscore is defined is boundary to a
> miracle. Could anyone help?

It's in zsh_system.h. Search for "define _(".

Roman.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where is `_' defined?
  2019-10-11 11:15 ` Where is `_' defined? Sebastian Gniazdowski
  2019-10-11 11:26   ` Roman Perepelitsa
@ 2019-10-11 11:30   ` Peter Stephenson
  2019-10-11 11:50     ` Sebastian Gniazdowski
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2019-10-11 11:30 UTC (permalink / raw)
  To: zsh-workers

On Fri, 2019-10-11 at 13:15 +0200, Sebastian Gniazdowski wrote:
> Hello,
> I'm trying to compile a part of Zsh. I'm getting the following error:
> 
> zsh.h:631:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_’
>  typedef void (*voidvoidfnptr_t) _((void));
> 
> Trying to find where the underscore is defined is boundary to a
> miracle. Could anyone help?

That's part of the system that fixes up prototypes for K&R C,
which I think is actually redundant by some number of decades.
See zsh_system.h.


#ifdef PROTOTYPES
# define _(Args) Args
#else
# define _(Args) ()
#endif


pws

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where is `_' defined?
  2019-10-11 11:26   ` Roman Perepelitsa
@ 2019-10-11 11:50     ` Sebastian Gniazdowski
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2019-10-11 11:50 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Zsh hackers list

On Fri, 11 Oct 2019 at 13:26, Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> On Fri, Oct 11, 2019 at 1:16 PM Sebastian Gniazdowski
> <sgniazdowski@gmail.com> wrote:
> > Trying to find where the underscore is defined is boundary to a
> > miracle. Could anyone help?
>
> It's in zsh_system.h. Search for "define _(".
>
> Roman.

Thanks, I was searching for such string, must have miss it.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Where is `_' defined?
  2019-10-11 11:30   ` Peter Stephenson
@ 2019-10-11 11:50     ` Sebastian Gniazdowski
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2019-10-11 11:50 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

On Fri, 11 Oct 2019 at 13:31, Peter Stephenson <p.stephenson@samsung.com> wrote:
>
> On Fri, 2019-10-11 at 13:15 +0200, Sebastian Gniazdowski wrote:
> > Hello,
> > I'm trying to compile a part of Zsh. I'm getting the following error:
> >
> > zsh.h:631:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_’
> >  typedef void (*voidvoidfnptr_t) _((void));
> >
> > Trying to find where the underscore is defined is boundary to a
> > miracle. Could anyone help?
>
> That's part of the system that fixes up prototypes for K&R C,
> which I think is actually redundant by some number of decades.
> See zsh_system.h.
>
>
> #ifdef PROTOTYPES
> # define _(Args) Args
> #else
> # define _(Args) ()
> #endif
>
>
> pws

Thanks

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20191011111614epcas2p2cccbf90d40bd33adca6b0a772247346b@epcas2p2.samsung.com>
2019-10-11 11:15 ` Where is `_' defined? Sebastian Gniazdowski
2019-10-11 11:26   ` Roman Perepelitsa
2019-10-11 11:50     ` Sebastian Gniazdowski
2019-10-11 11:30   ` Peter Stephenson
2019-10-11 11:50     ` Sebastian Gniazdowski

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git