diff mbox

libgo patch committed: Only define PathMax if PATH_MAX is defined

Message ID mcrbomhueog.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor April 24, 2012, 7:12 p.m. UTC
This patch to libgo only defines syscall.PathMax if PATH_MAX is defined
in the system header files.  Bootstrapped on x86_64-unknown-linux-gnu.
Committed to mainline and 4.7 branch.

Ian
diff mbox

Patch

diff -r 4692bc350a0a libgo/mksysinfo.sh
--- a/libgo/mksysinfo.sh	Tue Apr 24 09:23:40 2012 -0700
+++ b/libgo/mksysinfo.sh	Tue Apr 24 12:11:02 2012 -0700
@@ -275,8 +275,9 @@ 
   sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
 
 # The PATH_MAX constant.
-grep '^const _PATH_MAX ' gen-sysinfo.go |
+if grep '^const _PATH_MAX ' gen-sysinfo.go >/dev/null 2>&1; then
   echo 'const PathMax = _PATH_MAX' >> ${OUT}
+fi
 
 # epoll constants.
 grep '^const _EPOLL' gen-sysinfo.go |