Closed Bug 73211 Opened 24 years ago Closed 23 years ago

bad call to ctime_r while building libs

Categories

(Directory :: LDAP C SDK, defect)

HP
HP-UX
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0

People

(Reporter: mozilla, Assigned: dmosedale)

References

Details

Attachments

(1 file, 1 obsolete file)

in directory/c-sdk/ldap while doing a "gmake libs" an error occurs complaining about the wrong number of args to the ctime_r function. The error is in the file directory/c-sdk/ldap/libraries/libldap/compat.c In compat.c the code is in a block that is ifdef'd for HPUX10. so I will look to see if I can find why HPUX10 is getting defined on HPUX11 compat.c: line 64 (void) ctime_r( clock, buf, buflen ); in man page for ctime_r on HPUX11.00 char *ctime_r(const time_t *timer, char *buffer);
I turned this on eons ago (3 yrs)... the setting of HP10 while building on HP11. The old build system was like that (add on to the previous). I would guess that instead of an ifdef hpux, we should do ifdef ctime_r_with_3_args test in configure... I added barrett because I couldn't get bugzilla to accept __UNKNOWN__
QA Contact: __UNKNOWN__ → barrettl
Blocks: 18687
Blocks: 70658
So the autoconf wrappers in use for the LDAP C SDK are going to be thrown out and re-written when we move to v5.0 of the C SDK, so it's probably not worth writing this test right now, if it can be papered over with an ifdef.
Attached patch make it build on HPUX 11 (obsolete) (deleted) — Splinter Review
The thing about successive version symbols being cumulative seems wrong, but that's a bigger piece than I'm interested in biting off here, especially since this build system is going away. Here's a quick hack to get the libraries compiling, at least.
Status: NEW → ASSIGNED
I don't think this diff is quite right. in directory/c-sdk/ldap/include/portable.h around line 271 we check for ifdef HPUX10 & ! _REENTRANT on 11.00, HPUX10, _REENTRANT & HPUX11 are all defined So we will use the correct ctime_r However up above on line 245 we do a similar test for gethostbyname. Now in directory/c-sdk/ldap/libraries/libldap/compat.c we do the iftest for HPUX10 && _REENTRANT, but I contend that we should do HPUX10 && _REENTRANT && !HPUX11 So the better diff (I think) is: RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libldap/compat.c,v retrieving revision 1.1.16.1 diff -u -r1.1.16.1 compat.c --- compat.c 2000/04/20 16:21:37 1.1.16.1 +++ compat.c 2001/03/28 14:46:29 @@ -34,7 +34,7 @@ #include "ldap-int.h" -#if defined( HPUX10 ) && defined( _REENTRANT ) +#if defined( HPUX10 ) && defined( _REENTRANT ) && !defined(HPUX11) extern int h_errno; struct hostent *
OK, I agree: your patch looks better. r=dmose@netscape.com
sr=darin
Patch checked in on LDAPCSDK_40_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
adding nsbeta1+ since needed for merge from the LDAP C SDK v4.0
Keywords: nsbeta1+
Target Milestone: --- → mozilla1.0
Removed nsbeta1+; turns out this isn't necessary for the 5.0 branch, as a similar fix has already been checked in there.
Keywords: nsbeta1+
Putting the nsbeta1+ back, as I realized the patch that has already been checked in on the 5.0 branch is insufficient and will break the HP-UX 10 port. Reopening too.
Status: VERIFIED → REOPENED
Keywords: nsbeta1+
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
What's currently in the tree on the 5.x branch only builds on HPUX11, not HPUX10. This patch should build on both.
Attachment #28948 - Attachment is obsolete: true
mcs / mhein: can I get a quick review on this patch? Thanks!
r=mcs
Fix checked in on ldapcsdk_branch_50.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: