blob: 238745f704df38335d542d2a316c3596343dccda [file] [log] [blame]
Chet Ramey495aee42011-11-22 19:11:26 -05001# problem with bash-4.x versions before bash-4.2. required posix interp
2swap32_posix()
3{
4 local funcname=swap32_posix
5 local arg
6 for arg in "$@"; do
7 echo $((
8 ($arg & 4278190080) >> 24 |
9 ($arg & 16711680) >> 8 |
10 ($arg & 65280) << 8 |
11 ($arg & 255) << 24
12 ))
13 done
14}
15
16type swap32_posix