diff options
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 2e79b8a2f3..9c01e9bc2e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -209,6 +209,17 @@ extern char *gitbasename(char *); #include <openssl/err.h> #endif +/* On most systems <netdb.h> would have given us this, but + * not on some systems (e.g. z/OS). + */ +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif + +#ifndef NI_MAXSERV +#define NI_MAXSERV 32 +#endif + /* On most systems <limits.h> would have given us this, but * not on some systems (e.g. GNU/Hurd). */ @@ -637,8 +648,12 @@ int rmdir_or_warn(const char *path); */ int remove_or_warn(unsigned int mode, const char *path); -/* Call access(2), but warn for any error besides ENOENT. */ +/* + * 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); /* Warn on an inaccessible file that ought to be accessible */ void warn_on_inaccessible(const char *path); |