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/Include/macdefs.h | |
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/Include/macdefs.h')
-rw-r--r-- | Mac/Include/macdefs.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Mac/Include/macdefs.h b/Mac/Include/macdefs.h new file mode 100644 index 0000000..dcdedb1 --- /dev/null +++ b/Mac/Include/macdefs.h @@ -0,0 +1,38 @@ +/* Useful #includes and #defines for programming a set of Unix + look-alike file system access functions on the Macintosh. + Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). +*/ + +#include <Types.h> +#include <Files.h> +#include <OSUtils.h> + +#ifndef MPW +#include <pascal.h> +#endif + +#include <errno.h> +#include <string.h> + +/* Difference in origin between Mac and Unix clocks: */ +#define TIMEDIFF ((unsigned long) \ + (((1970-1904)*365 + (1970-1904)/4) * 24 * 3600)) + +/* Macro to find out whether we can do HFS-only calls: */ +#define FSFCBLen (* (short *) 0x3f6) +#define hfsrunning() (FSFCBLen > 0) + +/* Universal constants: */ +#define MAXPATH 256 +#define TRUE 1 +#define FALSE 0 +#ifndef NULL +#define NULL 0 +#endif +#define EOS '\0' +#define SEP ':' + +#if 0 // doesn't work +/* Call Macsbug: */ +pascal void Debugger() extern 0xA9FF; +#endif |