Issue #1615 - SunOS LDAP cleanup.

I meant to do this a long time ago, but basically it accounts for the new XP_SOLARIS build flag that never made it into the MailNews code. Additionally, it enables a compatibility flag for Solaris 11.4 that allows us to use the three-argument implementation of ctime_r still used by Solaris 11.3 and illumos (which also appears equivalent to the NSLDAPI_CTIME implementation used by libldap internally). Also, the ctime_r function has been added to the time.h header library for a while now, not sure why Mozilla thought we didn't have a ctime_r implementation.
This commit is contained in:
athenian200 2020-07-29 18:52:42 -05:00 committed by Roy Tam
commit f08ee332d7
3 changed files with 5 additions and 8 deletions

View file

@ -43,16 +43,11 @@
#include "ldap-int.h"
#include "disptmpl.h"
#if defined(_WINDOWS) || defined(aix) || defined(SCOOS) || defined(OSF1) || defined(SOLARIS)
#if defined(_WINDOWS) || defined(aix) || defined(SCOOS) || defined(OSF1) || defined(XP_SOLARIS)
#include <time.h> /* for struct tm and ctime */
#endif
/* This is totally lame, since it should be coming from time.h, but isn't. */
#if defined(SOLARIS)
char *ctime_r(const time_t *, char *, int);
#endif
static int do_entry2text( LDAP *ld, char *buf, char *base, LDAPMessage *entry,
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
writeptype writeproc, void *writeparm, char *eol, int rdncount,