[MinGW-dvlpr] scandir( )/alphasort( ) for libmingwex

Mohan Embar gnustuff@thisiscool.com
Fri Jul 25 01:58:00 GMT 2003


Hi Danny,

I'm taking the liberty of CCing the java mailing list on this.
Java people: note that in my original reply to Ranjit three
months ago, I erroneously pointed out that Tom (and not Andrew)
would have to approve this.

Mohan>> While we're on the subject of missing mingw32 stuff,
Mohan>> would anyone be interested in scandir() and alphasort()?
Mohan>> I coded these up a few months ago and got them
Mohan>> working under mingw-runtime-2.4, but wasn't too
Mohan>> motivated to submit them as you can see from the
Mohan>> forwarded email because this support then broke
Mohan>> the gcj front end.

Danny> Does JCF_USE_SCANDIR  work now with 3.3.1 and your proposed contrib?
Danny> If so, yes I am interested.

Nothing will work until I or someone else submits a patch for the gcj
front end, which hasn't been done yet.

Mohan>> If someone is interested, I'll submit this. Let me
Mohan>> know what you expect as far as coding standards,
Mohan>> tests, whether I need to take a shower before pressing
Mohan>> the [Send] key, etc.

Danny> A sample program in the samples/dirent directory would be useful.

Okay, so now I owe you two things:

- a sample Java program which tests out the FileDescriptor stuff
  you mentioned
- this

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

>> ------- Start of forwarded message -------
>> Subject: Fwd: Re: scandir( )/alphasort( ) for libmingwex
>> Date: 4/25/2003 1:30:34 AM
>>
>> Hi Ranjit,
>>
Ranjit>> >     I just wanted to know that you have this on
Ranjit>> >your list after you are through with your
Ranjit>> >cross-configury patch - do remember to submit this
Ranjit>> >to the MinGW maintainers after you are through with
Ranjit>> >3.3 patches.
>>
Mohan>> I'll do this, but I'm a bit demotivated because when
Mohan>> the JCF_USE_SCANDIR piece of jcf-io.c is "turned on",
Mohan>> all hell breaks loose on MingW. More patches will be
Mohan>> needed to jcf-io.c to make these work; I know how
Mohan>> to fix these, but I wonder how palatable some of them
Mohan>> will be to the Posix folks. For example, lines like
Mohan>> this:
>>
Mohan>> buffer[i] = ch == '.' ? '/' : ch;
>>
Mohan>> would need to become
>>
Mohan>> buffer[i] = (ch=='.' || IS_DIR_SEPARATOR(ch)) ? DIR_SEPARATOR : ch
>>
Mohan>> to properly canonicalize the cached paths. I envisioned
Mohan>> the arm-twisting needed to explain the rationale behind
Mohan>> this to Tom, who's already got a massive backlog, and got
Mohan>> demotivated.
>>
Mohan>> In the end, I ended up putting this effort on hold. However,
Mohan>> it will probably be needed for another piece I'm working
Mohan>> on: building all class files in libgcj with a <i>single</i>
Mohan>> invocation of gcj! I've got this working and it's
Mohan>> amazingly cool, but the patch needs to be polished more.

>> -------- End of forwarded message --------






More information about the Java mailing list