patch-libgo_mksysinfo_sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-libgo_mksysinfo_sh,v 1.1 2011/11/19 22:19:53 pascal Exp $
  2. --- libgo/mksysinfo.sh.orig Thu Nov 17 20:21:36 2011
  3. +++ libgo/mksysinfo.sh Thu Nov 17 21:16:33 2011
  4. @@ -96,7 +96,7 @@ grep '^const _E' gen-sysinfo.go | \
  5. sed -e 's/^\(const \)_\(E[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
  6. # The O_xxx flags.
  7. -grep '^const _\(O\|F\|FD\)_' gen-sysinfo.go | \
  8. +grep -E '^const _(O|F|FD)_' gen-sysinfo.go | \
  9. sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
  10. if ! grep '^const O_ASYNC' ${OUT} >/dev/null 2>&1; then
  11. echo "const O_ASYNC = 0" >> ${OUT}
  12. @@ -139,7 +139,7 @@ if grep '^const ___WALL = ' gen-sysinfo.go >/dev/null
  13. fi
  14. # Networking constants.
  15. -grep '^const _\(AF\|SOCK\|SOL\|SO\|IPPROTO\|TCP\|IP\|IPV6\)_' gen-sysinfo.go |
  16. +grep -E '^const _(AF|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |
  17. sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
  18. grep '^const _SOMAXCONN' gen-sysinfo.go |
  19. sed -e 's/^\(const \)_\(SOMAXCONN[^= ]*\)\(.*\)$/\1\2 = _\2/' \
  20. @@ -318,7 +318,7 @@ if test "$stat" != ""; then
  21. grep '^type _stat64 ' gen-sysinfo.go
  22. else
  23. grep '^type _stat ' gen-sysinfo.go
  24. -fi | sed -e 's/type _stat\(64\)\?/type Stat_t/' \
  25. +fi | sed -e 's/type _stat/type Stat_t/' \
  26. -e 's/st_dev/Dev/' \
  27. -e 's/st_ino/Ino/g' \
  28. -e 's/st_nlink/Nlink/' \
  29. @@ -344,7 +344,7 @@ if test "$dirent" != ""; then
  30. grep '^type _dirent64 ' gen-sysinfo.go
  31. else
  32. grep '^type _dirent ' gen-sysinfo.go
  33. -fi | sed -e 's/type _dirent\(64\)\?/type Dirent/' \
  34. +fi | sed -e 's/type _dirent/type Dirent/' \
  35. -e 's/d_name \[0+1\]/d_name [0+256]/' \
  36. -e 's/d_name/Name/' \
  37. -e 's/]int8/]byte/' \