summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-26 23:42:19 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-27 20:05:51 +0200
commitd49211e82c52a62920f78b7faec77c275467bd24 (patch)
tree758a2a2532cdc1e71c2efdbc886faabf77f5e1ab
parentae546bfca75294edebbc562640cc90f534e8e6b5 (diff)
Remove #ifdef BEN_HACK
-rw-r--r--src/util.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/util.c b/src/util.c
index bc8478e2..e8a0bad7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -482,18 +482,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
*/
#ifdef MACINTOSH
@@ -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 */
-
}