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 11:33:34 +0200

On Mon, 2014-04-14 at 11:03 +0200, Samuel Thibault wrote:
> Svante Signell, le Mon 14 Apr 2014 09:59:03 +0200, a écrit :
> > > > @@ -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?
> 
> I don't know any other system doing it, but a sed rule can't hurt even
> if there is no occurrence...

The current code was written by Thomas. I had the following in an older,
not so elegant patch: (I'm in no way fluent in sed, I need help here):
(indentation modified)

if grep 'define st_dev st_fsid' gen-sysinfo.go >/dev/null 2>&1; then
 grep '^type _stat ' gen-sysinfo.go | \
 sed -i.bak -e 's/st_fsid\([^;]*\)/st_fsid\1; st_dev\1/' gen-sysinfo.go
 grep '^type _stat ' ${OUT} | \
 sed -i.bak -e 's/st_fsid\([^;]*\)/&; st_dev\1/' ${OUT}
fi





reply via email to

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