diff options
author | Guido van Rossum <guido@python.org> | 1994-08-19 10:51:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-19 10:51:31 (GMT) |
commit | d4d77284408316a68cdc2ab9e8e1d4a06e534938 (patch) | |
tree | f25369ac9cc34663abcfd3be4b08035d8fe72c62 /Mac/Compat/sync.c | |
parent | e89bc75048d0142859379b2b92e77d984fdbef6e (diff) | |
download | cpython-d4d77284408316a68cdc2ab9e8e1d4a06e534938.zip cpython-d4d77284408316a68cdc2ab9e8e1d4a06e534938.tar.gz cpython-d4d77284408316a68cdc2ab9e8e1d4a06e534938.tar.bz2 |
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Diffstat (limited to 'Mac/Compat/sync.c')
-rw-r--r-- | Mac/Compat/sync.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Mac/Compat/sync.c b/Mac/Compat/sync.c new file mode 100644 index 0000000..a6487e1 --- /dev/null +++ b/Mac/Compat/sync.c @@ -0,0 +1,17 @@ +/* The equivalent of the Unix 'sync' system call: FlushVol. + Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). + For now, we only flush the default volume + (since that's the only volume written to by MacB). */ + +#include "macdefs.h" + +int +sync() +{ + if (FlushVol((StringPtr)0, 0) == noErr) + return 0; + else { + errno= ENODEV; + return -1; + } +} |