--- compat.c.orig Sun Nov 5 05:42:36 2000 +++ compat.c Wed Feb 14 12:54:25 2001 @@ -32,12 +32,47 @@ #ifdef HAVE_LIBPCRE # include #else /* Use native regex libraries */ -# include +# ifndef SUNOS4 +# include +# else +# define regex_t char +# define REG_EXTENDED 1 +# define REG_NOSUB 2 +# endif #endif /* HAVE_LIBRX */ int compat13 = 0; int compat20 = 0; int datafellows = 0; + +#ifdef SUNOS4 +char *regex_result; + +int +regcomp(regex_t *reg, const char *pat, const int bits) +{ + char *re_comp(); + regex_result = re_comp(pat); + return NULL != regex_result; +} +void +regerror(int ret, regex_t *reg, char *ebuf, int ebuflen) +{ + strncpy(ebuf,regex_result,ebuflen); +} + +int +regexec(regex_t *reg, char *string, size_t nmatch, char *pmatch, int flags) +{ + int re_exec(); + return 1 != re_exec(string); +} + +void +regfree(regex_t *reg) +{ +} +#endif void enable_compat20(void) --- defines.h.orig Thu Oct 19 23:14:05 2000 +++ defines.h Mon Jan 22 16:52:05 2001 @@ -338,8 +338,12 @@ /* Function replacement / compatibility hacks */ /* In older versions of libpam, pam_strerror takes a single argument */ +/* Older versions of PAM (1.10) don't define some symbols the same way */ #ifdef HAVE_OLD_PAM # define PAM_STRERROR(a,b) pam_strerror((b)) +# define PAM_DELETE_CRED PAM_CRED_DELETE +# define PAM_ESTABLISH_CRED PAM_CRED_ESTABLISH +# define PAM_NEW_AUTHTOK_REQD PAM_AUTHTOKEN_REQD #else # define PAM_STRERROR(a,b) pam_strerror((a),(b)) #endif --- fake-getnameinfo.c.orig Fri Sep 29 00:59:14 2000 +++ fake-getnameinfo.c Mon Jan 22 16:19:39 2001 @@ -30,10 +30,14 @@ if (host) { if (flags & NI_NUMERICHOST) { - if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen) + /* inet_ntoa wants aligned data on SPARC */ + struct in_addr align; + bcopy((char *)&sin->sin_addr, + (char *)&align, sizeof(struct in_addr)); + if (strlen(inet_ntoa(align)) >= hostlen) return EAI_MEMORY; - strcpy(host, inet_ntoa(sin->sin_addr)); + strcpy(host,inet_ntoa(align)); return 0; } else { hp = gethostbyaddr((char *)&sin->sin_addr,