A few days ago, I have installed ruby-1.4.3 on my home box,
a Macintosh PPC running Linux 2.0.33 (mk Linux DR3).
Everything went OK (except for the curses-based minesweeper,
but that is a very minor inconvenience).

Then, I tried to install it on my day-job machine,
a RS/6000 running AIX 4.3.1.0. And there, I got
compilation errors.

In ext/curses/curses.c, you cannot use a local variable "lines".
But changing it to "lines1" is OK.

In ext/socket/get[addr,name]info.c, h_errno is declared as
an external integer. In /usr/include/netdb.h, it is defined
as a macro. By commenting out the extern int, I could go on.

Lastly, there were errors during the link, but it did not
prevent the executable from being created.
ld: 0711-224 WARNING: Duplicate symbol: .gai_strerror
ld: 0711-224 WARNING: Duplicate symbol: gai_strerror
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.


I think that the lines -> lines1 change would not break anything
if you change the master sources. I think you can delete the declaration
of h_errno, since this symbol is already declared in the included file
netdb.h.

I have made the same alterations in the sources on my Linux box, and ruby
recompiled with no errors, and the tests went OK.

Here are the offending lines in netdb.h
For brevity's sake, I did not include the results of diff -c, but I can provide
them if you ask.

Jean Forget

--------------- excerpt of /usr/include/netdb.h for AIX -------------------
/*
 * h_errno is provided by h_errno_which() routine.
 * For non multi-threaded applications, it'll return the static h_errno
 * for the multi-threaded ones, it'll return the per-thread value.
 */
extern void *h_errno_which(void);
#define h_errno   (*(int *)h_errno_which())

--------------- excerpt of /usr/include/netdb.h for Linux------------------

/* Error status for non-reentrant lookup functions.  */
extern int h_errno;

/* Function to get address of global `h_errno' variable.  */
extern int *__h_errno_location __P ((void)) __attribute__ ((__const__));

--------------- end of the excerpts of /usr/include/netdb.h ---------------