mirror of
https://github.com/git/git.git
synced 2025-03-15 08:12:22 +00:00
Define fallback PATH_MAX on systems that do not define one in <limits.h>
Notably on GNU/Hurd, as reported by Gerrit Pape. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
17fd965d21
commit
d0c2449f78
@ -1,8 +1,7 @@
|
|||||||
#ifndef BUILTIN_H
|
#ifndef BUILTIN_H
|
||||||
#define BUILTIN_H
|
#define BUILTIN_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "git-compat-util.h"
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
extern const char git_version_string[];
|
extern const char git_version_string[];
|
||||||
extern const char git_usage_string[];
|
extern const char git_usage_string[];
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
|
/* On most systems <limits.h> would have given us this, but
|
||||||
|
* not on some systems (e.g. GNU/Hurd).
|
||||||
|
*/
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define NORETURN __attribute__((__noreturn__))
|
#define NORETURN __attribute__((__noreturn__))
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user