comparison src/win32/libc_interface.c @ 5913:9657e243d001

[gaim-migrate @ 6345] win32 adjustments for header re-org, and GPL header insertions where missing committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Tue, 17 Jun 2003 18:56:53 +0000
parents 0b355ec51083
children 26b739bc9f1a
comparison
equal deleted inserted replaced
5912:b3c412884a22 5913:9657e243d001
1 /* 1 /*
2 * libc_interface.c 2 * gaim
3 * 3 *
4 * Author: Herman Bloggs <hermanator12002@yahoo.com> 4 * File: libc_interface.c
5 * Date: October 14, 2002 5 * Date: October 14, 2002
6 * Description: Commonly used libc routines. 6 * Description: libc interface for Windows api
7 *
8 * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
7 */ 24 */
8 #include <winsock.h> 25 #include <winsock.h>
9 #include <io.h> 26 #include <io.h>
10 #include <stdlib.h> 27 #include <stdlib.h>
11 #include <stdio.h> 28 #include <stdio.h>
346 363
347 struct tm * wgaim_localtime_r (const time_t *time, struct tm *resultp) { 364 struct tm * wgaim_localtime_r (const time_t *time, struct tm *resultp) {
348 struct tm* tmptm; 365 struct tm* tmptm;
349 366
350 if(!time) 367 if(!time)
351 return; 368 return NULL;
352 tmptm = localtime(time); 369 tmptm = localtime(time);
353 if(resultp && tmptm) 370 if(resultp && tmptm)
354 return memcpy(resultp, tmptm, sizeof(struct tm)); 371 return memcpy(resultp, tmptm, sizeof(struct tm));
355 else 372 else
356 return NULL; 373 return NULL;