From: Junio C Hamano Date: Thu, 6 Jun 2013 19:19:06 +0000 (-0700) Subject: Merge branch 'rj/mingw-compat-st-mode-bits' X-Git-Tag: v1.8.4-rc0~200 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/00480a1e9ccd44f257c09c45c185c9c8825a3078?ds=inline;hp=-c Merge branch 'rj/mingw-compat-st-mode-bits' * rj/mingw-compat-st-mode-bits: path: Fix a sparse warning --- 00480a1e9ccd44f257c09c45c185c9c8825a3078 diff --combined git-compat-util.h index 660b7f012a,bdc1f436b4..aa0404ef41 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -127,6 -127,9 +127,9 @@@ #else #include #endif + + extern int get_st_mode_bits(const char *path, int *mode); + #if defined(__MINGW32__) /* pull in Windows compatibility stuff */ #include "compat/mingw.h" @@@ -163,7 -166,6 +166,6 @@@ typedef long intptr_t; typedef unsigned long uintptr_t; #endif - int get_st_mode_bits(const char *path, int *mode); #if defined(__CYGWIN__) #undef _XOPEN_SOURCE #include @@@ -185,11 -187,6 +187,11 @@@ #define probe_utf8_pathname_composition(a,b) #endif +#ifdef NEEDS_CLIPPED_WRITE +ssize_t clipped_write(int fildes, const void *buf, size_t nbyte); +#define write(x,y,z) clipped_write((x),(y),(z)) +#endif + #ifdef MKDIR_WO_TRAILING_SLASH #define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b)) extern int compat_mkdir_wo_trailing_slash(const char*, mode_t); @@@ -697,9 -694,8 +699,9 @@@ int remove_or_warn(unsigned int mode, c * Call access(2), but warn for any error except "missing file" * (ENOENT or ENOTDIR). */ -int access_or_warn(const char *path, int mode); -int access_or_die(const char *path, int mode); +#define ACCESS_EACCES_OK (1U << 0) +int access_or_warn(const char *path, int mode, unsigned flag); +int access_or_die(const char *path, int mode, unsigned flag); /* Warn on an inaccessible file that ought to be accessible */ void warn_on_inaccessible(const char *path);