[ruby-announce] [ANN] Win32Etc 0.0.1

"Berger, Daniel" <[email protected]> Fri, 15 Aug 2003 14:30:00 -0600
Newsgroups gmane.comp.lang.ruby.announce
Message-ID <[email protected]>
Hi all,

I'm happy to announce the release of Win32Etc 0.0.1.  This module ports the
methods of the Etc module to the Win32 platform.

Synopsis
=======
require "win32etc"

puts "Login: " + Win32Etc.getlogin

p Win32Etc.getpwnam("some_user")
p Win32Etc.getpwuid(2001)

p Win32Etc.getgrgid(501)
p Win32Etc.getgrnam("some_group")

# Note that the structs returned on Win32 contains different members than
*nix does

Win32Etc.passwd{ |pw|
   p pw
}

Win32Etc.group{ |g|
   p g
}

This release is considered ALPHA.

Known Issues:

Most of the methods contain memory leaks that I haven't been able to pin
down yet.  This is only an issue if you use these calls in a loop, in
which case you'll see about a 1k leak per iteration.
    
There is a warning during the build phase:
    
"win32etc.c(386) : warning C4142: benign redefinition of type"
    
I do not know how to resolve this (or if it even needs resolving).
    
None of the methods currently accept a server name for lookups.  For now
all lookups are done against your local machine.  See the Future Plans
section for more details.
    
Some of the error strings from rb_raise seem slightly messed up.  Should
be harmless though.

Any and all help on these issues is greatly appreciated.  My eventual goal
is convince Matz to merge these into the current Etc code so that the Etc
module is relatively seemless between *nix and Win32 systems.

Regards,

Dan