=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/edit.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- src/usr.bin/cvs/edit.c 2007/01/05 08:37:55 1.18 +++ src/usr.bin/cvs/edit.c 2007/01/05 08:52:37 1.19 @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.18 2007/01/05 08:37:55 xsa Exp $ */ +/* $OpenBSD: edit.c,v 1.19 2007/01/05 08:52:37 xsa Exp $ */ /* * Copyright (c) 2006, 2007 Xavier Santolaria * @@ -244,7 +244,7 @@ FILE *fp; struct tm *t; time_t now; - char *bfpath, *fdate; + char *bfpath, *fdate, thishost[MAXHOSTNAMELEN]; if (cvs_noexec == 1) return; @@ -259,8 +259,11 @@ fdate = asctime(t); + if (gethostname(thishost, sizeof(thishost)) == -1) + fatal("gethostname failed"); + (void)fprintf(fp, "E%s\t%s GMT\t%s\t%s\t\n", - cf->file_name, fdate, current_cvsroot->cr_host, cf->file_wd); + cf->file_name, fdate, thishost, cf->file_wd); if (edit_aflags & E_EDIT) (void)fprintf(fp, "E"); @@ -300,7 +303,7 @@ struct stat st; struct tm *t; time_t now; - char *bfpath, *fdate; + char *bfpath, *fdate, thishost[MAXHOSTNAMELEN]; if (cvs_noexec == 1) return; @@ -338,8 +341,11 @@ fdate = asctime(t); + if (gethostname(thishost, sizeof(thishost)) == -1) + fatal("gethostname failed"); + (void)fprintf(fp, "U%s\t%s GMT\t%s\t%s\t\n", - cf->file_name, fdate, current_cvsroot->cr_host, cf->file_wd); + cf->file_name, fdate, thishost, cf->file_wd); (void)fclose(fp);