| Anonymous | Login | Signup for a new account | 2013-06-20 07:11 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000161 | OCaml | OCaml general | public | 2000-07-12 10:59 | 2000-07-25 18:29 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | no change required | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000161: Unix.opendir under Windows | |||||||
| Description | I'm getting the following behavior for Unix.opendir under Windows 98, ocaml-3.00: # Unix.opendir "c:\\";; Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). # Unix.opendir "/";; Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). # Unix.opendir "\\";; Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). # Unix.opendir "c:/windows";; - : Unix.dir_handle = <abstr> # Unix.opendir "/windows ";; - : Unix.dir_handle = <abstr> Under Windows 2000: # Unix.opendir "c:\\";; - : Unix.dir_handle = <abstr> # Unix.opendir "/";; Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). # Unix.opendir "/winnt";; - : Unix.dir_handle = <abstr> -Trevor | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0002139) administrator (administrator) 2000-07-25 13:46 |
> > I'm getting the following behavior for Unix.opendir under Windows 98, > > ocaml-3.00: > > > > # Unix.opendir "c:\\";; > > Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). > > Well, Unix.opendir is implemented by FindFirstFile, and as I said in > my previous message, that function is documented not to work on root > directories. (The recommended workaround is to do > Unix.opendir "c:\\*", but this is really ugly.) OK. I have been using Unix.opendir "c:\\ " as my ugly hack. Is there some reason to believe that your ugly hack ("C:\\*") is going to be more robust than my ugly hack ("C:\\ ")? If so, I'll change mine. I still consider this a bug in Unix.opendir, because the implementation does not match the documentation (the Ocaml documentation, not the VC++ documentation). I hope you will fix it, either by implementing the ugly hack so I don't have to, or by changing the documentation so that the implementation matches the spec. Thanks, Trevor |
|
(0002140) administrator (administrator) 2000-07-25 18:28 |
> I'm getting the following behavior for Unix.opendir under Windows 98, > ocaml-3.00: > > # Unix.opendir "c:\\";; > Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). > # Unix.opendir "/";; > Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). > # Unix.opendir "\\";; > Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). > # Unix.opendir "c:/windows";; > - : Unix.dir_handle = <abstr> > # Unix.opendir "/windows ";; > - : Unix.dir_handle = <abstr> > > Under Windows 2000: > > # Unix.opendir "c:\\";; > - : Unix.dir_handle = <abstr> > # Unix.opendir "/";; > Uncaught exception: Unix.Unix_error (Unix.EINVAL, "opendir", ""). > # Unix.opendir "/winnt";; > - : Unix.dir_handle = <abstr> Well, Unix.opendir is implemented by FindFirstFile, and as I said in my previous message, that function is documented not to work on root directories. (The recommended workaround is to do Unix.opendir "c:\\*", but this is really ugly.) - Xavier |
|
(0002141) administrator (administrator) 2000-07-25 18:29 |
Windows lossage. |
|
(0002142) administrator (administrator) 2000-07-28 10:41 |
> The best fix I see is to dump VC++ entirely and go with Cygwin, whose > Unix emulation library is much better than anything we could write. > It seems Cygwin made progress recently on the thread-safety issue, so > the last obstacle to using Cygwin might be disappearing. That would be wonderful -- I hate to install VC++, it is a fat hog. And, I need to install Cygwin anyway, I use it for make, bash, and some other things. So, it gets my vote. I would be happy to be a beta tester if you decide to make the change. -Trevor |
|
(0002143) administrator (administrator) 2000-07-28 11:37 |
> OK. I have been using > Unix.opendir "c:\\ " > as my ugly hack. Is there some reason to believe that your ugly hack > ("C:\\*") is going to be more robust than my ugly hack ("C:\\ ")? If > so, I'll change mine. I don't know, except that "my" hack is the one suggested by the MSDN documentation. > I still consider this a bug in Unix.opendir, because the > implementation does not match the documentation (the Ocaml > documentation, not the VC++ documentation). I hope you will fix it, > either by implementing the ugly hack so I don't have to, or by > changing the documentation so that the implementation matches the > spec. The best fix I see is to dump VC++ entirely and go with Cygwin, whose Unix emulation library is much better than anything we could write. It seems Cygwin made progress recently on the thread-safety issue, so the last obstacle to using Cygwin might be disappearing. - Xavier Leroy |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |