From: Guillermo J. Rozas Date: Sun, 30 Aug 1992 14:09:28 +0000 (+0000) Subject: Fix truncate and ftruncate prototypes and flush FTRUNCATE_DECLARED X-Git-Tag: 20090517-FFI~9026 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0129206a4a6516d0eb462c4207a34f4fd7f2a14c;p=mit-scheme.git Fix truncate and ftruncate prototypes and flush FTRUNCATE_DECLARED nonsense. --- diff --git a/v7/src/microcode/bchdmp.c b/v7/src/microcode/bchdmp.c index f1b26ae39..16b1300c8 100644 --- a/v7/src/microcode/bchdmp.c +++ b/v7/src/microcode/bchdmp.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: bchdmp.c,v 9.66 1992/08/29 13:42:55 jinx Exp $ +$Id: bchdmp.c,v 9.67 1992/08/30 14:09:28 jinx Exp $ Copyright (c) 1987-1992 Massachusetts Institute of Technology @@ -66,10 +66,6 @@ extern int EXFUN (unlink, (CONST char *)); # define FASDUMP_FILENAME "/tmp/fasdumpXXXXXX" -#if (defined(_HPUX) && (_HPUX_VERSION >= 80)) || defined(_SYSV4) || defined(__osf__) -# define FTRUNCATE_DECLARED -#endif - #endif /* DOS386 */ #include "bchgcc.h" @@ -255,9 +251,8 @@ DEFUN (fasdump_exit, (length), long length) #ifdef HAVE_FTRUNCATE { -#ifndef FTRUNCATE_DECLARED - extern int EXFUN (ftruncate, (int, unsigned long)); -#endif + extern int EXFUN (ftruncate, (int, size_t)); + ftruncate (dump_file, length); result = ((close (dump_file)) == 0); } @@ -268,7 +263,7 @@ DEFUN (fasdump_exit, (length), long length) #endif /* HAVE_FTRUNCATE */ #if defined(HAVE_TRUNCATE) && !defined(HAVE_FTRUNCATE) { - extern int EXFUN (truncate, (CONST char *, unsigned long)); + extern int EXFUN (truncate, (CONST char *, size_t)); truncate (dump_file_name, length); }