1#include "../git-compat-util.h"2#undef write34/*5* Version of write that will write at most INT_MAX bytes.6* Workaround a xnu bug on Mac OS X7*/8ssize_t clipped_write(int fildes, const void *buf, size_t nbyte)9{10if (nbyte > INT_MAX)11nbyte = INT_MAX;12return write(fildes, buf, nbyte);13}