Hello Claudio,
> >> rpl_freopen (const char *filename, const char *mode, FILE *stream)
> >> {
> >> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
> >> +# ifdef _MSC_VER
> >> + if (!filename) return NULL; /* would trigger a runtime error on MSVC */
> >> +# endif
> >>if
Bruno Haible writes:
> Claudio Bley wrote:
>>
>> --- freopen.c.orig 2011-08-03 14:22:15 +0200
>> +++ freopen.c2011-08-25 21:01:46 +0200
>> @@ -38,7 +38,7 @@
>> rpl_freopen (const char *filename, const char *mode, FILE *stream)
>> {
>> #if (defined _WIN32 || defin
Bastien ROUCARIES wrote:
> >> - hpux has pstat
> >
> > More details, please? pstat_getfiledetails does not return a file name.
>
> See pstat_getpathname()
I can't find a definition of pst_fid anywhere. Also, this function only
accesses a cache; it may fail. Also, what if fd is a pipe or socket?
On Wed, Aug 31, 2011 at 9:54 PM, Bruno Haible wrote:
> Bastien ROUCARIES wrote:
>> More means to retrieve file name
>> - linux /proc/self/fd
>> - windows FileInformation of GetFileInformationByHandleEx
>> - freebsd using FDESCFS /dev/fd or proc
>> - solaris using FDESCFS or proc
>> - osx as /dev/
Bastien ROUCARIES wrote:
> More means to retrieve file name
> - linux /proc/self/fd
> - windows FileInformation of GetFileInformationByHandleEx
> - freebsd using FDESCFS /dev/fd or proc
> - solaris using FDESCFS or proc
> - osx as /dev/fd
> - irix has /dev/fd
Interesting, yes. That would work.
>
On Wed, Aug 31, 2011 at 11:13 AM, Bastien ROUCARIES
wrote:
> On Wed, Aug 31, 2011 at 10:49 AM, Bruno Haible wrote:
>> Claudio Bley wrote:
>>> Furthermore, using NULL as filename does not work at all using the MS
>>> C runtime library (debug assertion violation).
>>>
>>>
>>> -
On Wed, Aug 31, 2011 at 10:49 AM, Bruno Haible wrote:
> Claudio Bley wrote:
>> Furthermore, using NULL as filename does not work at all using the MS
>> C runtime library (debug assertion violation).
>>
>>
>> --- freopen.c.1 2011-08-25 21:05:34 +0200
>> +++ freopen.c 2011
Claudio Bley wrote:
> Furthermore, using NULL as filename does not work at all using the MS
> C runtime library (debug assertion violation).
>
>
> --- freopen.c.1 2011-08-25 21:05:34 +0200
> +++ freopen.c 2011-08-25 21:08:52 +0200
> @@ -38,6 +38,9 @@
> rpl_freopen (cons
Claudio Bley wrote:
> When calling
>
> freopen(NULL, mode, stream);
>
> on MS Windows using MinGW segfaults because it tries to strcmp(NULL,
> "/dev/null")... *ouch*
>
>
> --- freopen.c.orig2011-08-03 14:22:15 +0200
> +++ freopen.c 2011-08-25 21:01:46 +0200
> @@ -38,7 +
Hi.
When calling
freopen(NULL, mode, stream);
on MS Windows using MinGW segfaults because it tries to strcmp(NULL,
"/dev/null")... *ouch*
--- freopen.c.orig 2011-08-03 14:22:15 +0200
+++ freopen.c 2011-08-25 21:01:46 +0200
@@ -38,7 +38,7 @@
rpl_freopen (const char
10 matches
Mail list logo