Re: GVfs status report
- From: "Dominic Lachowicz" <domlachowicz gmail com>
- To: "John Ehresman" <jpe wingware com>
- Cc: gnome-vfs <gnome-vfs-list gnome org>, gtk-devel-list <gtk-devel-list gnome org>, Havoc Pennington <hp redhat com>, Alexander Larsson <alexl redhat com>
- Subject: Re: GVfs status report
- Date: Mon, 17 Sep 2007 11:15:12 -0400
> The issue is that file descriptors shouldn't be passed from a dll / exe
> using one C runtime to another using a different C runtime -- or if they
> are, they must be used only with functions from the appropriate C
> runtime. Use of file descriptors within a single dll is generally not a
> problem.
That's correct, and a major complaint of people using gstdio's
g_fopen() routine.
> The native win32 calls (CreateFile and others) probably has advantages,
> but I can't say whether a separate implementation would be desirable.
As best as I can tell, most of stdio is just shallow wrappers around
the native Win32 API.
A major discrepancy (as I've said before) is that Windows places an
artificial limit of 2k FILE*s or fd_ts per process. Wine even goes so
far as to duplicate this madness. By not using the Win32
"CreateFile/OpenFile" functions, you unintentionally limit how many
open files a user of your library might have.
This comes up more than you'd think in real life. For example, here's
a bug against Sun's JVM reported against JDK 1.1 and not fixed until
JDK 1.5:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4189011
Cheers,
Dom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]