Re: GVfs status report

> 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]