bug-coreutils
[Top][All Lists]
Advanced

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

RE: porting coreutils 5.2.1 to Interix


From: Mark Funkenhauser
Subject: RE: porting coreutils 5.2.1 to Interix
Date: Mon, 5 Apr 2004 14:15:00 -0400


> -----Original Message-----
> From: Jim Meyering [mailto:address@hidden 
> Sent: Sunday, April 04, 2004 11:28 AM
> To: address@hidden
> Cc: address@hidden
> Subject: Re: porting coreutils 5.2.1 to Interix
> 
> 
> "Mark Funkenhauser" <address@hidden> wrote:
> > I've ported the coreutils to Interix.
> 
> > configure:
> >   - around line 27329 - you exit if not getmntent/getmntinfo api is
> > found.
> 
> Without getmntent or similar support, df won't work at all.
> Doesn't Interix have some sort of interface for determining
> how much space is used on each file system?  If so, we can
> extend the autoconf macro in m4/ls-mntd-fs.m4 so that it
> works for Interix, too.

df has its own internal getmntinfo() function.
Just a look looking for valid mounted Windows drive letters.
This function was never put into libc or into the subsystem.

Because support for mount()/unmount() was being developed at
the time and so getmntinfo() would have changed radically
with real mount support.

> 
> > src/stat.c:
> >    [ see the attached  stat.c.diff file ]
> >
> >    You assume (in configure - see HAVE_STRUCT_STATVFS_F_BASETYPE)
> >    that the struct statvfs contains the f_basetype member.
> >    This would be incorrect.
> >
> >    You assume that all OS's have the statfs() function.
> 
> Actually, I wasn't quite so presumptuous :)
> I merely noted that all systems that I knew about -- and that I
> considered reasonable porting targets -- met those conditions.

Sorry, didn't mean it to be quite so personal.
I was thinking "You assume" as more "the code makes the assumption ...."

I understand very well that "code is not portable" but rather
 "it's code that has been ported to x,y,z,... ".


Looks like UNIX's  f_fsbasetype[FSTYPESZ]  is equivalent 
to Interix's f_fstypename[MNAMELEN+1] .
Although the buffer sizes are probably very different.


> 
> > src/mknod.c:
> >   - Interix defines a mkdev() macro, not a makedev() macro.
> >     The diff output is:
 
> Are you sure Interix has no makedev macro?

Absolutely.  An oversight on my part.
Of which I have no control over anymore.
But I can try to get it into the next release of Interix.
(but don't hold your breath)

> 
> Assuming there really is no macro with the `makedev' spelling,
> I'll need to know which file to include to get the mkdev definition.
> The file to change will probably be src/system.h, near the code that
> already handles a missing `major' macro/function.

The existing macro in Interix is called "mkdev()".
It is in <sys/mkdev.h>.  Right beside the definitions for major() and
minor(). 







reply via email to

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