Message ID | 1399366718.13092.53.camel@G3620.my.own.domain |
---|---|
State | New |
Headers | show |
Svante Signell, le Tue 06 May 2014 10:58:38 +0200, a écrit : > The patch for st_dev by Thomas Schwinge was not liked by Samuel Uh? I said “These should be fine, however.” and “a sed rule can't hurt even if there is no occurrence...” So just keep that precise part back as it was, no need for being clumsy. What I however said was: “Err, these seem to get applied to all systems, not just GNU/Hurd, isn't that a concern?” By that, I mean this: > +# Special treatment of EWOULDBLOCK for GNU/Hurd > +# /usr/include/bits/errno.h: #define EWOULDBLOCK EAGAIN > +egrep '^const EWOULDBLOCK = Errno(_EWOULDBLOCK)' ${OUT} | \ > + sed -i.bak -e 's/_EWOULDBLOCK/_EAGAIN/' ${OUT} > + and that: > +# Special treatment of SYS_FCNTL for GNU/Hurd > +if ! grep '^const SYS_FCNTL' ${OUT} >/dev/null 2>&1; then > + echo "const SYS_FCNTL = 0" >> ${OUT} > +fi AIUI, the patch you propose does those changes for all systems, not just GNU/Hurd. That most probably will pose a problem. Samuel
On Tue, 2014-05-06 at 11:07 +0200, Samuel Thibault wrote: > Svante Signell, le Tue 06 May 2014 10:58:38 +0200, a écrit : > > The patch for st_dev by Thomas Schwinge was not liked by Samuel > > Uh? > > I said “These should be fine, however.” and “a sed rule can't hurt even > if there is no occurrence...” > > So just keep that precise part back as it was, no need for being clumsy. > > What I however said was: > > “Err, these seem to get applied to all systems, not just GNU/Hurd, isn't > that a concern?” > > By that, I mean this: > > > +# Special treatment of EWOULDBLOCK for GNU/Hurd > > +# /usr/include/bits/errno.h: #define EWOULDBLOCK EAGAIN > > +egrep '^const EWOULDBLOCK = Errno(_EWOULDBLOCK)' ${OUT} | \ > > + sed -i.bak -e 's/_EWOULDBLOCK/_EAGAIN/' ${OUT} > > + This applies to all systems yes, how to modify? > and that: > > > +# Special treatment of SYS_FCNTL for GNU/Hurd > > +if ! grep '^const SYS_FCNTL' ${OUT} >/dev/null 2>&1; then > > + echo "const SYS_FCNTL = 0" >> ${OUT} > > +fi And this applies to systems not defining FCNTL. How many systems could possibly be affected? > AIUI, the patch you propose does those changes for all systems, not just > GNU/Hurd. That most probably will pose a problem. And you wrote in your reply to the above: see e.g. http://gcc.gnu.org/ml/gcc-patches/2014-04/msg00644.html > These should be fine, however. I asked for help with sed but have not obtained any yet, so what to do?
Svante Signell, le Tue 06 May 2014 14:13:54 +0200, a écrit : > > > +# Special treatment of EWOULDBLOCK for GNU/Hurd > > > +# /usr/include/bits/errno.h: #define EWOULDBLOCK EAGAIN > > > +egrep '^const EWOULDBLOCK = Errno(_EWOULDBLOCK)' ${OUT} | \ > > > + sed -i.bak -e 's/_EWOULDBLOCK/_EAGAIN/' ${OUT} > > > + > > This applies to all systems yes, how to modify? Well, either explicitly test for the system, or find a way to make it actually do things only for the systems which need it. You could for instance grep for "#define EWOULDBLOCK EAGAIN". > > and that: > > > > > +# Special treatment of SYS_FCNTL for GNU/Hurd > > > +if ! grep '^const SYS_FCNTL' ${OUT} >/dev/null 2>&1; then > > > + echo "const SYS_FCNTL = 0" >> ${OUT} > > > +fi > > And this applies to systems not defining FCNTL. > How many systems could possibly be affected? I misread it indeed, I'm sorry about that. So it adds SYS_FCNTL = 0 to any system which does not have it already. What is the consequence of this? Where is this used? (I can't find any go reference to SYS_FCNTL in the gcc source) Samuel
--- a/src/libgo/runtime/netpoll.goc.orig 2013-11-07 01:23:21.000000000 +0100 +++ b/src/libgo/runtime/netpoll.goc 2014-03-28 09:07:15.000000000 +0100 @@ -68,7 +68,7 @@ runtime_netpollinit(); } -func runtime_pollOpen(fd uintptr) (pd *PollDesc, errno int) { +func runtime_pollOpen(fd uintptr) (pd *PollDesc, errno1 int) { pd = allocPollDesc(); runtime_lock(pd); if(pd->wg != nil && pd->wg != READY) @@ -84,7 +84,7 @@ pd->wd = 0; runtime_unlock(pd); - errno = runtime_netpollopen(fd, pd); + errno1 = runtime_netpollopen(fd, pd); } func runtime_pollClose(pd *PollDesc) {