matplotlib and python 2.2


I'm trying to compile matplotlib on centos3 (redhat el3). it has python 2.2.3
I get a gcc error:

building 'matplotlib._na_cntr' extension
gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.2 -c src/_na_cntr.c -o build/temp.linux-i686-2.2/_na_cntr.o -DNUMARRAY=1 -O3 -Wall -fPIC -m32 -Wa,--32
src/_na_cntr.c:1701: error: parse error before "init_na_cntr"
src/_na_cntr.c:1702: warning: return type defaults to `int'
src/_na_cntr.c: In function `init_na_cntr':
src/_na_cntr.c:1706: warning: `return' with no value, in function returning non-void
src/_na_cntr.c:1712: warning: `return' with no value, in function returning non-void
src/_na_cntr.c:1716: warning: dereferencing type-punned pointer will break strict-aliasing rules
error: command 'gcc' failed with exit status 1

seems that PyMODINIT_FUNC is unknown.
I added
#define PyMODINIT_FUNC DL_EXPORT(void) in cntr.c
and it compiles.
But, I try to launch a example, I get the same error:

Traceback (most recent call last):
  File "", line 2, in ?
    from pylab import *
  File "/usr/lib/python2.2/site-packages/", line 1, in ?
    from matplotlib.pylab import *
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 869, in ?
    rcParams = rc_params()
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 817, in rc_params
    fname = matplotlib_fname()
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 793, in matplotlib_fname
    fname = os.path.join(get_configdir(), 'matplotlibrc')
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 261, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 351, in _get_configdir
    if not _is_writable_dir(h):
  File "/usr/lib/python2.2/site-packages/matplotlib/", line 199, in _is_writable_dir
    t = tempfile.TemporaryFile(dir=p)
TypeError: TemporaryFile() got an unexpected keyword argument 'dir'

Is python2.2 no more supported?