| 345 /* time.h */ |
345 /* time.h */ |
| 346 |
346 |
| 347 struct tm * wgaim_localtime_r (const time_t *time, struct tm *resultp) { |
347 struct tm * wgaim_localtime_r (const time_t *time, struct tm *resultp) { |
| 348 struct tm* tmptm; |
348 struct tm* tmptm; |
| 349 |
349 |
| |
350 if(!time) |
| |
351 return; |
| 350 tmptm = localtime(time); |
352 tmptm = localtime(time); |
| 351 if(resultp && tmptm) |
353 if(resultp && tmptm) |
| 352 return memcpy(resultp, tmptm, sizeof(struct tm)); |
354 return memcpy(resultp, tmptm, sizeof(struct tm)); |
| 353 else |
355 else |
| 354 return NULL; |
356 return NULL; |