- Changes donated by Elemental Security to make it work on AIX 5.3
  with IBM's 64-bit compiler (SF patch #1284289).  This also closes SF
  bug #105470: test_pwd fails on 64bit system (Opteron).
diff --git a/Modules/makexp_aix b/Modules/makexp_aix
index 9d3bccb..cb349c2 100755
--- a/Modules/makexp_aix
+++ b/Modules/makexp_aix
@@ -70,6 +70,12 @@
 #    left with just the symbol name.
 # 7. Eliminate all entries containing two colons, like Class::method
 #
-/usr/ccs/bin/nm -Bex $inputFiles				\
+
+# Use -X32_64 if it appears to be implemented in this version of 'nm'.
+NM=/usr/ccs/bin/nm
+xopt=-X32_64
+$NM -e $xopt $1 >/dev/null 2>&1 || xopt=""
+
+$NM -Bex $xopt $inputFiles					\
 | sed -e '/ [^BDT] /d' -e '/\./d' -e 's/.* [BDT] //' -e '/::/d'	\
 | sort | uniq >> $expFileName