zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _GNU_SOURCE when __GNU__
@ 2009-05-30 17:53 Clint Adams
  2009-07-12 16:37 ` Clint Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2009-05-30 17:53 UTC (permalink / raw)
  To: zsh-workers; +Cc: bdefreese

As far as I can tell, nothing is included up to this point which
define __GLIBC__, so the Hurd wasn't getting the
nanosecond-resolution structs guarded by __USE_MISC
and thus was not able to use them in Src/cond.c.
This has nothing to do with /dev/ptmx.

Here is a band-aid:

Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.53
diff -u -r1.53 system.h
--- Src/system.h	16 Jun 2008 22:50:44 -0000	1.53
+++ Src/system.h	30 May 2009 17:40:43 -0000
@@ -37,7 +37,7 @@
 #endif
 #endif
 
-#if defined(__linux) || defined(__GLIBC__)
+#if defined(__linux) || defined(__GNU__)
 /*
  * Turn on numerous extensions.
  * This is in order to get the functions for manipulating /dev/ptmx.


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

* Re: PATCH: _GNU_SOURCE when __GNU__
  2009-05-30 17:53 PATCH: _GNU_SOURCE when __GNU__ Clint Adams
@ 2009-07-12 16:37 ` Clint Adams
  2009-07-12 17:18   ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2009-07-12 16:37 UTC (permalink / raw)
  To: zsh-workers; +Cc: Cyril Brulebois

On Sat, May 30, 2009 at 05:53:33PM +0000, Clint Adams wrote:
> As far as I can tell, nothing is included up to this point which
> define __GLIBC__, so the Hurd wasn't getting the
> nanosecond-resolution structs guarded by __USE_MISC
> and thus was not able to use them in Src/cond.c.
> This has nothing to do with /dev/ptmx.

So it seems that Debian GNU/kFreeBSD is actually hard-coding
a __GLIBC__ define in gcc for some reason.  Could someone
think of a sane configure test for these struct members instead,
or is it futile?


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

* Re: PATCH: _GNU_SOURCE when __GNU__
  2009-07-12 16:37 ` Clint Adams
@ 2009-07-12 17:18   ` Peter Stephenson
  2009-08-01  4:16     ` Clint Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2009-07-12 17:18 UTC (permalink / raw)
  To: zsh-workers; +Cc: Cyril Brulebois

On Sun, 12 Jul 2009 16:37:08 +0000
Clint Adams <clint@zsh.org> wrote:

> On Sat, May 30, 2009 at 05:53:33PM +0000, Clint Adams wrote:
> > As far as I can tell, nothing is included up to this point which
> > define __GLIBC__, so the Hurd wasn't getting the
> > nanosecond-resolution structs guarded by __USE_MISC
> > and thus was not able to use them in Src/cond.c.
> > This has nothing to do with /dev/ptmx.
> 
> So it seems that Debian GNU/kFreeBSD is actually hard-coding
> a __GLIBC__ define in gcc for some reason.  Could someone
> think of a sane configure test for these struct members instead,
> or is it futile?

It should be just a question of #include'ing <sys/stat.h> and testing if
either st_atim.tv_nsec or st_atimensec is present in struct
stat---however, you'd need to be sure the definitions aren't trodden on
by something in system.h.  We really need to be sure of that anyway, to
ensure consistency, but actually system.h is a bit murky (and I mean a
bit murky on the zsh scale, not on the scale of good programming).

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


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

* Re: PATCH: _GNU_SOURCE when __GNU__
  2009-07-12 17:18   ` Peter Stephenson
@ 2009-08-01  4:16     ` Clint Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Clint Adams @ 2009-08-01  4:16 UTC (permalink / raw)
  To: zsh-workers

On Sun, Jul 12, 2009 at 06:18:07PM +0100, Peter Stephenson wrote:
> It should be just a question of #include'ing <sys/stat.h> and testing if
> either st_atim.tv_nsec or st_atimensec is present in struct
> stat---however, you'd need to be sure the definitions aren't trodden on
> by something in system.h.  We really need to be sure of that anyway, to
> ensure consistency, but actually system.h is a bit murky (and I mean a
> bit murky on the zsh scale, not on the scale of good programming).

Since I apparently have no time to do anything useful until November,
I might as well unbreak what I broke in the meantime.

Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.54
diff -u -r1.54 system.h
--- Src/system.h	30 May 2009 17:55:50 -0000	1.54
+++ Src/system.h	1 Aug 2009 04:14:47 -0000
@@ -37,7 +37,7 @@
 #endif
 #endif
 
-#if defined(__linux) || defined(__GNU__)
+#if defined(__linux) || defined(__GNU__) || defined(__GLIBC__)
 /*
  * Turn on numerous extensions.
  * This is in order to get the functions for manipulating /dev/ptmx.


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

end of thread, other threads:[~2009-08-01  4:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-30 17:53 PATCH: _GNU_SOURCE when __GNU__ Clint Adams
2009-07-12 16:37 ` Clint Adams
2009-07-12 17:18   ` Peter Stephenson
2009-08-01  4:16     ` Clint Adams

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).