[PD-dev] Win32 - unicode support for files, with public API for externals

IOhannes m zmölnig zmoelnig at iem.at
Tue Dec 18 10:56:39 CET 2012


On 12/18/2012 04:40, Hans-Christoph Steiner wrote:
>
> I think this approach works.

thanks

> The patch you provided seems totally untested, as in not even compiled on GNU/Linux or Mac OS X.  It includes the _close() function in sys_close() which only works on Win32 and it gives this warning when building on Mac OS X:

thanks for the compliments :-)

i can assure you that the code is tested as in "compiled without warning 
on gcc-4.7.2 on a debian/gnu linux (wheezy/sid) system" and has been 
field-tested and shown to be able to load externals that the old code 
has not been able to load.

however, you are of course right that the use of "_close()" is indeed an 
oversight, which only did not trigger a problem so far, as sys_close() 
is nowhere used yet.

>
> s_path.c: In function ‘sys_open’:
> s_path.c:450: warning: ‘mode_t’ is promoted to ‘int’ when passed through ‘...’
> s_path.c:450: warning: (so you should pass ‘int’ not ‘mode_t’ to ‘va_arg’)
> s_path.c:450: note: if this code is reached, the program will abort


the patch includes some comments pointing to an online discussion of the 
problem. to summarize: using mode_t in va_list will always trigger some 
problems. either we accept the warning (the code will never be reached, 
since a runtime-test will use a va_arg(..., int) instead) or we move the 
test to configure (autoconf).

since i am the only one who seems to like autoconf, i decided for the 
less invasive solution.


>
> (I attached the patch for reference, it doesn't seem to be up on the patch tracker any more.)
>

it seems that the patch has moved to the "bug" tracker.
i moved it back to "patches" [1].


fgmasdr
IOhannes


[1] 
https://sourceforge.net/tracker/?func=detail&aid=3596865&group_id=55736&atid=478070



More information about the Pd-dev mailing list