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

Olaf Wagner wagner at elegosoft.com
Mon Apr 12 10:12:12 CEST 2010


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




-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list