diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-08-21 05:29:30 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-08-21 05:29:30 +0000 |
commit | e162e288ecf5a5eb16bd6c0cb432afa233e1e10b (patch) | |
tree | 10f9c14d152864cb89dcfac9fdc51411ce3050d4 | |
parent | bb51debe06ed605988ea0a49a417ace62de47725 (diff) | |
download | gcc-e162e288ecf5a5eb16bd6c0cb432afa233e1e10b.zip gcc-e162e288ecf5a5eb16bd6c0cb432afa233e1e10b.tar.gz gcc-e162e288ecf5a5eb16bd6c0cb432afa233e1e10b.tar.bz2 |
mksysinfo: Fix syscall.F_GETLK and friends for 32-bit x86.
From-SVN: r190554
-rwxr-xr-x | libgo/mksysinfo.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 3955344..315d60c 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -211,6 +211,16 @@ if ! grep '^const O_CLOEXEC' ${OUT} >/dev/null 2>&1; then echo "const O_CLOEXEC = 0" >> ${OUT} fi +# These flags can be lost on i386 GNU/Linux when using +# -D_FILE_OFFSET_BITS=64, because we see "#define F_SETLK F_SETLK64" +# before we see the definition of F_SETLK64. +for flag in F_GETLK F_SETLK F_SETLKW; do + if ! grep "^const ${flag} " ${OUT} >/dev/null 2>&1 \ + && grep "^const ${flag}64 " ${OUT} >/dev/null 2>&1; then + echo "const ${flag} = ${flag}64" >> ${OUT} + fi +done + # The signal numbers. grep '^const _SIG[^_]' gen-sysinfo.go | \ grep -v '^const _SIGEV_' | \ |