X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bfile%2Fmfile.c;h=002a3f966bfec4d2780d796aa92627bf7b543372;hb=587c1d5cac956ec0cf482fc14ecea40240e85fd8;hp=8e85e79d236a57cab55628d5c0272718755062ee;hpb=9839f960344403921a7740bed060088054034a5d;p=idzebra-moved-to-github.git diff --git a/bfile/mfile.c b/bfile/mfile.c index 8e85e79..002a3f9 100644 --- a/bfile/mfile.c +++ b/bfile/mfile.c @@ -1,10 +1,26 @@ -/* - * Copyright (C) 1994-2002, Index Data - * All rights reserved. - * Sebastian Hammer, Adam Dickmeiss - * - * $Id: mfile.c,v 1.46 2002-07-16 09:52:20 heikki Exp $ - */ +/* $Id: mfile.c,v 1.49 2002-08-02 19:26:55 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 + Index Data Aps + +This file is part of the Zebra server. + +Zebra is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + + /* @@ -248,7 +264,9 @@ MFile_area mf_init(const char *name, const char *spec, const char *base) dent->d_name); return 0; } +#ifndef WIN32 fsync(fd); +#endif close(fd); if (dirp->max_bytes >= 0) dirp->avail_bytes -= part_f->bytes; @@ -411,7 +429,9 @@ int mf_close(MFile mf) for (i = 0; i < mf->no_files; i++) if (mf->files[i].fd >= 0) { +#ifndef WIN32 fsync(mf->files[i].fd); +#endif close(mf->files[i].fd); mf->files[i].fd = -1; }