JSInt64 dlsOffset;
PRMJ_DSTOffset(JSInt64 local_time){    JSInt64 us2s;    JSInt64 dlsOffset;#ifdef XP_MAC    /*     * Convert the local time passed in to Macintosh epoch seconds. Use UTC utilities to convert     * to UTC time, then compare difference with our GMT offset. If they are the same, then     * DST must not be in effect for the input date/time.     */    UInt32 macLocalSeconds = (local_time / PRMJ_USEC_PER_SEC) + gJanuaryFirst1970Seconds, utcSeconds;    ConvertLocalTimeToUTC(macLocalSeconds, &utcSeconds);    if ((utcSeconds - macLocalSeconds) == PRMJ_LocalGMTDifference())        return 0;    else {    	JSLL_UI2L(us2s, PRMJ_USEC_PER_SEC);    	JSLL_UI2L(dlsOffset, PRMJ_HOUR_SECONDS);    	JSLL_MUL(dlsOffset, dlsOffset, us2s);        return dlsOffset;    }#else    time_t local;    JSInt32 diff;    JSInt64  maxtimet;    struct tm tm;    PRMJTime prtm;#if ( defined( USE_AUTOCONF ) && !defined( HAVE_LOCALTIME_R) ) || ( !defined ( USE_AUTOCONF ) && ( defined( XP_PC ) || defined( __FreeBSD__ ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) ) )    struct tm *ptm;#endif    JSLL_UI2L(us2s, PRMJ_USEC_PER_SEC);    JSLL_DIV(local_time, local_time, us2s);    /* get the maximum of time_t value */    JSLL_UI2L(maxtimet,PRMJ_MAX_UNIX_TIMET);    if(JSLL_CMP(local_time,>,maxtimet)){      JSLL_UI2L(local_time,PRMJ_MAX_UNIX_TIMET);    } else if(!JSLL_GE_ZERO(local_time)){      /*go ahead a day to make localtime work (does not work with 0) */      JSLL_UI2L(local_time,PRMJ_DAY_SECONDS);    }    JSLL_L2UI(local,local_time);    PRMJ_basetime(local_time,&prtm);#if ( defined( USE_AUTOCONF ) && !defined( HAVE_LOCALTIME_R) ) || ( !defined ( USE_AUTOCONF ) && ( defined( XP_PC ) || defined( __FreeBSD__ ) || defined ( HPUX9 ) || defined ( SNI ) || defined ( NETBSD ) || defined ( OPENBSD ) || defined( RHAPSODY ) ) )    ptm = localtime(&local);    if(!ptm){      return JSLL_ZERO;    }    tm = *ptm;#else    localtime_r(&local,&tm); /* get dst information */#endif    diff = ((tm.tm_hour - prtm.tm_hour) * PRMJ_HOUR_SECONDS) +	((tm.tm_min - prtm.tm_min) * 60);    if(diff < 0){	diff += PRMJ_DAY_SECONDS;    }    JSLL_UI2L(local_time,diff);    JSLL_MUL(local_time,local_time,us2s);    return(local_time);#endif}