1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Added Chris Demetriou's FSYNC_ALL option which causes all writes to be

flushed immediately.  (In case of a crash in the middle of CVS/RCS commits
This commit is contained in:
Nate Williams 1993-06-28 19:13:10 +00:00
parent 43d5830f3d
commit 967cd26f61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51
2 changed files with 18 additions and 4 deletions

View File

@ -1,5 +1,10 @@
LIB= rcs
SRCS= maketime.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c rcskeep.c \
rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcsutil.c merger.c
# Define FSYNC_ALL to get slower but safer writes in case of crashes in
# the middle of CVS/RCS changes
CFLAGS += -DFSYNC_ALL
LIB = rcs
SRCS = maketime.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcsutil.c \
merger.c
.include <bsd.lib.mk>

View File

@ -39,6 +39,9 @@ Report problems and direct all questions to:
/* $Log: rcslex.c,v $
* Revision 1.1.1.1 1993/06/18 04:22:12 jkh
* Updated GNU utilities
*
* Revision 5.11 1991/11/03 03:30:44 eggert
* Fix porting bug to ancient hosts lacking vfprintf.
*
@ -132,7 +135,7 @@ Report problems and direct all questions to:
#include "rcsbase.h"
libId(lexId, "$Id: rcslex.c,v 5.11 1991/11/03 03:30:44 eggert Exp $")
libId(lexId, "$Id: rcslex.c,v 1.1.1.1 1993/06/18 04:22:12 jkh Exp $")
static struct hshentry *nexthsh; /*pointer to next hash entry, set by lookup*/
@ -935,7 +938,13 @@ void testIerror(f) FILE *f; { if (ferror(f)) Ierror(); }
void testOerror(o) FILE *o; { if (ferror(o)) Oerror(); }
void Ifclose(f) RILE *f; { if (f && Iclose(f)!=0) Ierror(); }
#ifndef FSYNC_ALL
void Ofclose(f) FILE *f; { if (f && fclose(f)!=0) Oerror(); }
#else
void Ofclose(f) FILE *f; { if (f && (fflush(f)!=0 ||
fsync(fileno(f))!=0 ||
fclose(f)!=0)) Oerror(); }
#endif
void Izclose(p) RILE **p; { Ifclose(*p); *p = 0; }
void Ozclose(p) FILE **p; { Ofclose(*p); *p = 0; }