Commit 0dc9b212 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add defines for sys_open, sys_close, sys_fopen and sys_fclose as placeholders...

add defines for sys_open, sys_close, sys_fopen and sys_fclose as placeholders until the code to handle utf-8 filenames on Windows gets ported
parent 4b530bfe
......@@ -64,6 +64,9 @@ extern int pd_compatibilitylevel; /* e.g., 43 for pd 0.43 compatibility */
#include <stddef.h> /* just for size_t -- how lame! */
/* for FILE, needed by sys_fopen() and sys_fclose() only */
#include <stdio.h>
#define MAXPDSTRING 1000 /* must be >= FILENAME_MAX */
#define MAXPDARG 5 /* max number of args we can typecheck today */
......@@ -527,6 +530,20 @@ EXTERN int sched_geteventno(void);
EXTERN double sys_getrealtime(void);
EXTERN int (*sys_idlehook)(void); /* hook to add idle time computation */
/* Win32's open()/fopen() do not handle UTF-8 filenames so we need
* these internal versions that handle UTF-8 filenames the same across
* all platforms. They are recommended for use in external
* objectclasses as well so they work with Unicode filenames on Windows
For now, we're just doing typedefs to alias the standard io calls. But
once someone wants to build on Windows, the relevant commits should be ported
from Pd Vanilla. See Pd Vanilla git commit:
plus some other revisions after that one. */
# define sys_open open
# define sys_close close
# define sys_fopen fopen
# define sys_fclose fclose
/* ------------ threading ------------------- */
EXTERN void sys_lock(void);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment