Ticket #3798 (closed patch)
portability patch
| Reported by: | pogma | Owned by: | rlaager |
|---|---|---|---|
| Milestone: | Component: | unclassified | |
| Version: | 2.2.2 | Keywords: | |
| Cc: |
Description
Hi, Building pidgin-2.2.2 on solaris2.6-2.10, hpux11.00-11.23, aix5.1-5.3, osf5.1, irix6.5 and red hat linux7.1 to rhel-5, we had some issues.
With the attached patch it works on all the above platforms.
Not included in the patch, because we scripted it, is a patch to add:
#ifdef HAVE_CONFIG_H #include <config.h> #endif
to the top of every .c file, prior to any other #include statements. Without this, compilation failed on AIX.
The changes to delay initialization of GnuTLS are there because libgcrypt will exit the application on those systems without /dev/random or other entropy gathering socket source. Not good if you just want to use, e.g. AIM.
The configure alloca check is needed by getopt.c.
We changed
char s[2] = {erasechar(), 0};
to
char s[2]; s[0] = erasechar(); s[1] = 0;
Because of compiler complaints that the initializers must be constants.
Similar changes in a lot of places.
static struct _node root = {.ref = 1, .flags = 0};
This is c99, we have a number of c89 only compilers, so it became (ick):
static struct _node root = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1,
0};
There were a few places that we had to change dot initializers.
Some compilers complained until we put 'typedef enum' after the enum involved.
osf segfaults using the forked dns resolver, forced it to use the blocking version.
A couple of variable declarations in the middle of blocks were changed.
Use inet_ntoa if there is no inet_ntop
"fixed" and aix infinite loop in the signal handler.



