author | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Jun 2009 19:48:34 +0000 (12:48 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Jun 2009 19:48:34 +0000 (12:48 -0700) |
* bc/solaris:
configure: test whether -lresolv is needed
Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
Makefile: add section for SunOS 5.7
Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Makefile: define __sun__ on SunOS
git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall
Conflicts:
Makefile
configure: test whether -lresolv is needed
Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
Makefile: add section for SunOS 5.7
Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Makefile: define __sun__ on SunOS
git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall
Conflicts:
Makefile
1 | 2 | |||
---|---|---|---|---|
Makefile | patch | | diff1 | | diff2 | | blob | history |
config.mak.in | patch | | diff1 | | diff2 | | blob | history |
configure.ac | patch | | diff1 | | diff2 | | blob | history |
git-compat-util.h | patch | | diff1 | | diff2 | | blob | history |
diff --cc Makefile
Simple merge
diff --cc config.mak.in
index e8d96e88b92a2305e50eb1adcff7f9d0f3310996,d0cd1558117bd944f63250f3f09d366d8875e62f..dd6045131880111bb09306cb3e48330a0e5acdac
--- 1/config.mak.in
--- 2/config.mak.in
+++ b/config.mak.in
NO_OPENSSL=@NO_OPENSSL@
NO_CURL=@NO_CURL@
NO_EXPAT=@NO_EXPAT@
+NO_LIBGEN_H=@NO_LIBGEN_H@
NEEDS_LIBICONV=@NEEDS_LIBICONV@
NEEDS_SOCKET=@NEEDS_SOCKET@
+ NEEDS_RESOLV=@NEEDS_RESOLV@
NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
diff --cc configure.ac
Simple merge
diff --cc git-compat-util.h
index f25f7f1a9eda48477485c2406402a0a06fd9c8e3,48d99fab863eb2462a266cd1bac31d88ffd59f8d..919b7f1ade9cab3c4ba907f9506e3cb518fb9e7f
--- 1/git-compat-util.h
--- 2/git-compat-util.h
+++ b/git-compat-util.h
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
- #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
+ #if defined(__sun__)
+ /*
+ * On Solaris, when _XOPEN_EXTENDED is set, its header file
+ * forces the programs to be XPG4v2, defeating any _XOPEN_SOURCE
+ * setting to say we are XPG5 or XPG6. Also on Solaris,
+ * XPG6 programs must be compiled with a c99 compiler, while
+ * non XPG6 programs must be compiled with a pre-c99 compiler.
+ */
+ # if __STDC_VERSION__ - 0 >= 199901L
+ # define _XOPEN_SOURCE 600
+ # else
+ # define _XOPEN_SOURCE 500
+ # endif
+ #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
+#ifndef __sun__
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
+#endif
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _BSD_SOURCE 1