[M3devel] unused/little used stuff in m3core/unix?

Jay K jay.krell at cornell.edu
Mon Apr 12 14:45:50 CEST 2010


Ok on preserving most/all of these but note I'm not keen on preserving like anything dealing with structs or time_t.

There are various arguments for/against.

This "systems" language interoperates well with C, directly, IF you control the C.

Thus we have wrappers. We almost never interface directly with "the OS".

  Then again, same is true of C. Actual "kernels" have custom calling mechanisms, which gets wrapped in C.

I'm not sure we should provide a general set of wrappers, or leave it to each user to write his own,

  or provide some simple small set. Leaving it to each user is error prone, granted.

The historical implementation here was awful and *really* *not* the way.

The question then is what should the implementation be.

 

 

 - Jay

 
> Date: Mon, 12 Apr 2010 10:12:12 +0200
> From: wagner at elegosoft.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] unused/little used stuff in m3core/unix?
> 
> Quoting Jay K <jay.krell at cornell.edu>:
> 
> > Following are not used:
> >
> > fchmod
> > fchown
> > getpagesize
> > sbrk
> > creat
> > isatty
> >
> > That isn't necessarily all.
> >
> > Some are used only in:
> >
> > C:\dev2\cm3.2\m3-libs\libm3\src\os\POSIX
> > e.g.
> > chdir
> > getdtablesize
> > execve
> >
> > Some are used only in the unused m3-pkgtools directory or by cvsup.
> > e.g. umask
> >
> > These all traffic in pretty "plain" types (e.g. no structs, no 
> > time_t). So just keep them all?
> 
> Yes. These are standard POSIX or Unix legacy interfaces.
> Do not throw them out.
> 
> > Note of course, uses of these somewhat or significantly inhibit
> > porting to native Win32.
> 
> As these are POSIX, that is to be expected.
> 
> > Account for somewhat arbirary Posix-specific code outside the cm3 tree
> > and err toward wrapping stuff that is easy?
> >
> > Or push the idea that m3core/libm3 are a good (and safe) portability 
> > layer and only provide what they need, and
> > gradually move them towards C to reduce their needs?
> 
> As a systems programming language, we should support standard OS
> interfaces IMO.
> 
> Olaf 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100412/6020507c/attachment-0002.html>


More information about the M3devel mailing list