From d49211e82c52a62920f78b7faec77c275467bd24 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 26 Jun 2012 23:42:19 +0200 Subject: Remove #ifdef BEN_HACK --- src/util.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src') diff --git a/src/util.c b/src/util.c index bc8478e2..e8a0bad7 100644 --- a/src/util.c +++ b/src/util.c @@ -481,18 +481,6 @@ errr my_fputs(FILE *fff, cptr buf, huge n) } -/* -* Code Warrior is a little weird about some functions -*/ -#ifdef BEN_HACK -extern int open(const char *, int, ...); -extern int close(int); -extern int read(int, void *, unsigned int); -extern int write(int, const void *, unsigned int); -extern long lseek(int, long, int); -#endif /* BEN_HACK */ - - /* * The Macintosh is a little bit brain-dead sometimes */ @@ -581,11 +569,6 @@ errr fd_copy(cptr file, cptr what) * * Note that we assume that the file should be "binary" * -* XXX XXX XXX The horrible "BEN_HACK" code is for compiling under -* the CodeWarrior compiler, in which case, for some reason, none -* of the "O_*" flags are defined, and we must fake the definition -* of "O_RDONLY", "O_WRONLY", and "O_RDWR" in "A-win-h", and then -* we must simulate the effect of the proper "open()" call below. */ int fd_make(cptr file, int mode) { @@ -594,19 +577,6 @@ int fd_make(cptr file, int mode) /* Hack -- Try to parse the path */ if (path_parse(buf, 1024, file)) return ( -1); -#ifdef BEN_HACK - - /* Check for existance */ - /* if (fd_close(fd_open(file, O_RDONLY | O_BINARY))) return (1); */ - - /* Mega-Hack -- Create the file */ - (void)my_fclose(my_fopen(file, "wb")); - - /* Re-open the file for writing */ - return (open(buf, O_WRONLY | O_BINARY, mode)); - -#else /* BEN_HACK */ - #ifdef MACH_O_CARBON { @@ -629,8 +599,6 @@ return (open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode)); #endif /* MACH_O_CARBON */ -#endif /* BEN_HACK */ - } -- cgit v1.2.3