Closed Bug 189089 Opened 22 years ago Closed 21 years ago

port nspr w32 now.c fix to directory

Categories

(Directory :: LDAP C SDK, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Biesinger, Assigned: mcs)

Details

Attachments

(1 file)

see bug 188396 - now.c won't work for dates after 2038. windows provides an api
for that, though, so it should be used.

bug 188396 already contains the patch for the nspr now.c, this should be simple.
Status: NEW → ASSIGNED
Target Milestone: --- → 5.12
Looks ok - should now be declared long long, or is that equivalent to __int64 on
Windows?  If this is exactly the same as the NSPR fix, then it's probably ok.
Rich,

I guess you are right.  We probably should declare 'now' as:

#ifdef __GNUC__
    long long now;
#else
    __int64 now;
#endif

Apparently gcc on Windows also understands Microsoft Visual
C++'s __int64 type because the code compiles.
The change is exactly the one from NSPR.
Only the #ifdef __GNUC__ was added to the NSPR code later, so I included it.

now is declared as __int64 only for WIN32, Unix systems use gettimeofday() and a
long long now.
Fix committed to the trunk:

mozilla/directory/c-sdk/config/now.c
  new revision: 5.1; previous revision: 5.0
    Fix 189089 - port nspr w32 now.c fix to directory.
        See bug # 188396 - NSPR should not use ftime on windows.
        This fixes a potential Year 2038 issue.

Please re-open this bug if we need this fix on ldapcsdk_50_client_branch right away.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Spam for bug 129472
QA Contact: nobody → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: