I'd suggest running some of PG regression tests on that installation, here the full set of things above returns correct results:
select version();
version
-------------------------------------------------------------
PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)
select tree_next_key(null,null);
tree_next_key
---------------
00000000
(1 row)
select 0<2^7;
?column?
----------
t
(1 row)
select 0=2^7;
?column?
----------
f
(1 row)
select 2^7;
?column?
----------
128
(1 row)