diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-21 06:02:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-21 06:02:44 -0700 |
commit | 8d676d85f772ce3a100b6f0dddd1c34a7e4313cf (patch) | |
tree | b6fa143842fc72a3bb2079dfdb66f30ce5126319 /git-compat-util.h | |
parent | 919e06b2288270f47c55759e8810b87f74609caf (diff) | |
parent | 5e87eae97df69a48a575fd79131e85067f9dbf13 (diff) | |
download | git-8d676d85f772ce3a100b6f0dddd1c34a7e4313cf.tar.gz |
Merge branch 'gv/portable'
* gv/portable:
test-lib: use DIFF definition from GIT-BUILD-OPTIONS
build: propagate $DIFF to scripts
Makefile: Tru64 portability fix
Makefile: HP-UX 10.20 portability fixes
Makefile: HPUX11 portability fixes
Makefile: SunOS 5.6 portability fix
inline declaration does not work on AIX
Allow disabling "inline"
Some platforms lack socklen_t type
Make NO_{INET_NTOP,INET_PTON} configured independently
Makefile: some platforms do not have hstrerror anywhere
git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
test_cmp: do not use "diff -u" on platforms that lack one
fixup: do not unconditionally disable "diff -u"
tests: use "test_cmp", not "diff", when verifying the result
Do not use "diff" found on PATH while building and installing
enums: omit trailing comma for portability
Makefile: -lpthread may still be necessary when libc has only pthread stubs
Rewrite dynamic structure initializations to runtime assignment
Makefile: pass CPPFLAGS through to fllow customization
Conflicts:
Makefile
wt-status.h
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 81ceb7f906..c9d53397ad 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -224,7 +224,6 @@ static inline const char *skip_prefix(const char *str, const char *prefix) #define PROT_READ 1 #define PROT_WRITE 2 #define MAP_PRIVATE 1 -#define MAP_FAILED ((void*)-1) #endif #define mmap git_mmap @@ -253,6 +252,10 @@ extern int git_munmap(void *start, size_t length); #endif /* NO_MMAP */ +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) +#endif + #ifdef NO_ST_BLOCKS_IN_STRUCT_STAT #define on_disk_bytes(st) ((st).st_size) #else |