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:
parent
16da259a04
commit
eb376b1704
@ -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>
|
||||
|
@ -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; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user