(original) (raw)
--- ./Modules/posixmodule.c.aix Wed Oct 13 11:30:56 2004 +++ ./Modules/posixmodule.c Mon Feb 7 15:51:27 2005 @@ -2873,6 +2873,22 @@ #endif #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX */ +#ifdef _AIX41 +/* aix 4.1.5 doesn't have ptsname,grantpt,unlockpt. So we supply openpty. */ +#define HAVE_OPENPTY 1 + +/* Create pseudo tty master slave pair and set terminal attributes + according to TERMP and WINP. Return handles for both ends in + AMASTER and ASLAVE, and return the name of the slave end in NAME. */ +int +openpty (int *amaster, int *aslave, char *name, struct termios *termp, + struct winsize *winp) +{ + errno = ENOENT; + return -1; +} +#endif + #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX) PyDoc_STRVAR(posix_openpty__doc__, "openpty() -> (master_fd, slave_fd)\n\n\ --- ./Modules/_cursesmodule.c.aix Wed Aug 4 10:33:28 2004 +++ ./Modules/_cursesmodule.c Wed Feb 9 16:11:50 2005 @@ -128,6 +128,16 @@ #if defined(_AIX) #define STRICT_SYSV_CURSES +#ifdef _AIX41 +void use_env(char f) { } +int wgetnstr(WINDOW *win, char *str, int n) { + char buf[8192]; + int rc = wgetstr(win,buf); + strncpy(str,buf,n); + str[n-1] = 0; + return rc; +} +#endif #endif /* Definition of exception curses.error */ --- ./Python/dynload_aix.c.aix Sat Mar 22 11:35:37 2003 +++ ./Python/dynload_aix.c Wed Feb 9 16:10:06 2005 @@ -103,6 +103,21 @@ return 0; } +#ifdef _AIX41 +static int +aix_bindnewmodule(void *newmoduleptr, void *modlistptr) +{ + register ModulePtr modptr; + + /* + -- Bind the new module with the list of loaded modules. + */ + for (modptr = (ModulePtr)modlistptr; modptr; modptr = modptr->next) + if (loadbind(0, modptr->entry, newmoduleptr) != 0) + return -1; + return 0; +} +#endif static void aix_loaderror(const char *pathname) @@ -178,6 +193,11 @@ aix_loaderror(pathname); return NULL; } - +#ifdef _AIX41 + if (aix_bindnewmodule((void *)p, staticmodlistptr) == -1) { + aix_loaderror(pathname); + return NULL; + } +#endif return p; }