diff options
author | nate <nate@FreeBSD.org> | 1993-06-28 19:13:10 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1993-06-28 19:13:10 +0000 |
commit | eb376b17040f2cf73338489238a096d3c669d8cc (patch) | |
tree | b1576707b61810b68f22787cb5e9361605e38282 | |
parent | 16da259a04ac0ad5de054ba767770e93dc8ac2fb (diff) | |
download | FreeBSD-src-eb376b17040f2cf73338489238a096d3c669d8cc.zip FreeBSD-src-eb376b17040f2cf73338489238a096d3c669d8cc.tar.gz |
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
-rw-r--r-- | gnu/usr.bin/rcs/lib/Makefile | 11 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcslex.c | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gnu/usr.bin/rcs/lib/Makefile b/gnu/usr.bin/rcs/lib/Makefile index b198e9e..f0d4725 100644 --- a/gnu/usr.bin/rcs/lib/Makefile +++ b/gnu/usr.bin/rcs/lib/Makefile @@ -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> diff --git a/gnu/usr.bin/rcs/lib/rcslex.c b/gnu/usr.bin/rcs/lib/rcslex.c index 51e31f3..cedbc40 100644 --- a/gnu/usr.bin/rcs/lib/rcslex.c +++ b/gnu/usr.bin/rcs/lib/rcslex.c @@ -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; } |