*** ./uip/mhlsbr.c.ORIG Tue Jan 8 18:17:06 2013 --- ./uip/mhlsbr.c Tue Jan 8 18:17:31 2013 *************** *** 1520,1525 **** --- 1520,1529 ---- # include #endif + #if (defined(_AIX51) || defined(_AIX52) || defined(_AIX53)) && !(defined(_AIX61)) + #define ss_family __ss_family + #endif + static int doface (struct mcomp *c1) { *** ./sbr/netsec.c.ORIG Thu May 30 01:00:51 2019 --- ./sbr/netsec.c Thu May 30 01:01:51 2019 *************** *** 788,793 **** --- 788,797 ---- return rc; } + #ifndef va_copy + # define va_copy(__list1,__list2) ((void)(__list1 = __list2)) + #endif + /* * Write bytes to the network using printf()-style formatting. * *** ./uip/whatnowproc.c.ORIG Thu May 30 00:59:14 2019 --- ./uip/whatnowproc.c Thu May 30 00:59:44 2019 *************** *** 7,12 **** --- 7,13 ---- #include + #include "unsetenv.c" /* * This routine is used by comp, repl, forw, and dist to exec *** ./uip/unsetenv.c.ORIG Thu May 30 01:00:16 2019 --- ./uip/unsetenv.c Thu May 30 01:00:11 2019 *************** *** 0 **** --- 1,38 ---- + /*************************************************************************** + unsetenv() + ****************************************************************************/ + + #if defined(_AIX) && !defined(_AIX52) + int + unsetenv( const char *name ) + { + size_t len; + char **ep; + + if ((name == NULL) || (*name == '\0') || (strchr( name, '=' ) != NULL)) + { + errno = EINVAL; + return( -1 ); + } + + len = strlen( name ); + + ep = environ; + while (*ep != NULL) + if (! strncmp( *ep, name, len ) && (*ep)[len] == '=') + { + /* Found it. Remove this pointer by moving later ones back. */ + char **dp = ep; + + do + dp[0] = dp[1]; + while (*dp++); + /* Continue the loop in case NAME appears again. */ + } + else + ++ep; + + return( 0 ); + } + #endif +