OSDN Git Service

mksysinfo: Only define PathMax if PATH_MAX is defined.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Apr 2012 19:12:38 +0000 (19:12 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Apr 2012 19:12:38 +0000 (19:12 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186779 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/mksysinfo.sh

index 487965b..4f51533 100755 (executable)
@@ -275,8 +275,9 @@ grep '^const __PC' gen-sysinfo.go |
   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 |