bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hurd port for gcc go PATCH 7-9 (9)


From: Svante Signell
Subject: Re: Hurd port for gcc go PATCH 7-9 (9)
Date: Mon, 14 Apr 2014 09:59:03 +0200

On Fri, 2014-04-11 at 22:55 +0200, Samuel Thibault wrote:
> Svante Signell, le Fri 11 Apr 2014 14:57:35 +0200, a écrit :
> > --- a/src/libgo/mksysinfo.sh
> > +++ b/src/libgo/mksysinfo.sh
> 
> Err, these seem to get applied to all systems, not just GNU/Hurd, isn't
> that a concern?
> 
> > @@ -210,6 +210,11 @@
> >    egrep '#define E[A-Z0-9_]+ ' | \
> >    sed -e 's/^#define \(E[A-Z0-9_]*\) .*$/const \1 = Errno(_\1)/' >> ${OUT}
> >  
> > +# 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}
> > +
> >  # The O_xxx flags.
> >  egrep '^const _(O|F|FD)_' gen-sysinfo.go | \
> >    sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
> > @@ -225,6 +230,11 @@
> >    echo "const F_DUPFD_CLOEXEC = 0" >> ${OUT}
> >  fi
> >  
> > +# 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
> > +
> >  # These flags can be lost on i386 GNU/Linux when using
> >  # -D_FILE_OFFSET_BITS=64, because we see "#define F_SETLK F_SETLK64"
> >  # before we see the definition of F_SETLK64.
> 
> These should be fine, however.

OK!

> > @@ -528,6 +538,8 @@
> >  
> >  # The stat type.
> >  # Prefer largefile variant if available.
> > +# Special treatment of st_dev for GNU/Hurd
> > +# /usr/include/i386-gnu/bits/stat.h: #define st_dev st_fsid
> >  stat=`grep '^type _stat64 ' gen-sysinfo.go || true`
> >  if test "$stat" != ""; then
> >    grep '^type _stat64 ' gen-sysinfo.go
> > @@ -536,6 +548,7 @@
> >  fi | sed -e 's/type _stat64/type Stat_t/' \
> >           -e 's/type _stat/type Stat_t/' \
> >           -e 's/st_dev/Dev/' \
> > +         -e 's/st_fsid/Dev/' \
> >           -e 's/st_ino/Ino/g' \
> >           -e 's/st_nlink/Nlink/' \
> >           -e 's/st_mode/Mode/' \

Don't know if any other system defines st_fsid as st_dev like Hurd does.
If not this one would be fine too?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]