View | Details | Raw Unified | Return to bug 14813
Collapse All | Expand All

(-)src/contrib/perl5/ext/POSIX/POSIX.xs Wed Nov 10 20:04:30 1999 (-2 / +1 lines)
Lines 3617-3637 Link Here
3617
    CODE:
3617
    CODE:
3618
       {
3618
       {
3619
           char tmpbuf[128];
3619
           char tmpbuf[128];
3620
           struct tm mytm;
3620
           struct tm mytm;
3621
           int len;
3621
           int len;
3622
           init_tm(&mytm);     /* XXX workaround - see init_tm() above */
3622
           bzero(&mytm, sizeof(mytm));
3623
           mytm.tm_sec = sec;
3623
           mytm.tm_sec = sec;
3624
           mytm.tm_min = min;
3624
           mytm.tm_min = min;
3625
           mytm.tm_hour = hour;
3625
           mytm.tm_hour = hour;
3626
           mytm.tm_mday = mday;
3626
           mytm.tm_mday = mday;
3627
           mytm.tm_mon = mon;
3627
           mytm.tm_mon = mon;
3628
           mytm.tm_year = year;
3628
           mytm.tm_year = year;
3629
           mytm.tm_wday = wday;
3629
           mytm.tm_wday = wday;
3630
           mytm.tm_yday = yday;
3630
           mytm.tm_yday = yday;
3631
           mytm.tm_isdst = isdst;
3631
           mytm.tm_isdst = isdst;
3632
           (void) mktime(&mytm);
3633
           len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm);
3632
           len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm);
3634
           /*
3633
           /*
3635
           ** The following is needed to handle to the situation where
3634
           ** The following is needed to handle to the situation where
3636
           ** tmpbuf overflows.  Basically we want to allocate a buffer
3635
           ** tmpbuf overflows.  Basically we want to allocate a buffer
3637
           ** and try repeatedly.  The reason why it is so complicated
3636
           ** and try repeatedly.  The reason why it is so complicated

Return to bug 14813