mingw: remove mingw_write
Since 0b6806b9 ("xread, xwrite: limit size of IO to 8MB"), this wrapper is no longer needed, as read and write are already split into small chunks. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Erik Faye-Lund committed
Jan 17, 2014 at 15:17 UTC
c9df6f4574c0174efd5000e0e99dca97ddb5034c
2 files changed
-20
compat/mingw.c
-17
@@ -304,23 +304,6 @@ int mingw_open (const char *filename, int oflags, ...)
304
return fd;
305
}
306
307
-#undef write
308
-ssize_t mingw_write(int fd, const void *buf, size_t count)
309
-{
310
- /*
311
- * While write() calls to a file on a local disk are translated
312
- * into WriteFile() calls with a maximum size of 64KB on Windows
313
- * XP and 256KB on Vista, no such cap is placed on writes to
314
- * files over the network on Windows XP. Unfortunately, there
315
- * seems to be a limit of 32MB-28KB on X64 and 64MB-32KB on x86;
316
- * bigger writes fail on Windows XP.
317
- * So we cap to a nice 31MB here to avoid write failures over
318
- * the net without changing the number of WriteFile() calls in
319
- * the local case.
320
- */
321
- return write(fd, buf, min(count, 31 * 1024 * 1024));
322
-}
323
-
307
static BOOL WINAPI ctrl_ignore(DWORD type)
308
{
309
return TRUE;
compat/mingw.h
-3
@@ -180,9 +180,6 @@ int mingw_rmdir(const char *path);
180
int mingw_open (const char *filename, int oflags, ...);
181
#define open mingw_open
182
183
-ssize_t mingw_write(int fd, const void *buf, size_t count);
184
-#define write mingw_write
185
-
183
int mingw_fgetc(FILE *stream);
184
#define fgetc mingw_fgetc
185