This is the mail archive of the
mailing list for the pthreas-win32 project.
Re: problems with ctime_r
- To: <pthreads-win32 at sourceware dot cygnus dot com>, "Ed Barker" <barkeref at sigcomp dot com>
- Subject: Re: problems with ctime_r
- From: "magza" <magza at hotmail dot com>
- Date: Fri, 22 Dec 2000 09:15:11 +0100
- References: <firstname.lastname@example.org>
It is a bug and I have reported this my self in an older version of
pthreads-win32 and apparantly it's back again.
Regards Magnus Zakrisson
----- Original Message -----
From: "Ed Barker" <email@example.com>
Sent: Thursday, December 21, 2000 8:27 PM
Subject: problems with ctime_r
> I just downloaded the latest version of pthreads-win32, and I am now
> getting errors.
> Most of the errors were due to redefinitions of symbols defined in
> I was able to work around this by making sure I included winsock before
> However, I am still getting errors when trying to call the function
> ctime_r. My old code used to work, so I diffed the old and new versions
> The old version was:
> #define ctime_r( _clock, _buf, _len ) \
> ( strncpy( (_buf), ctime( (_clock) ), (_len) ), \
> (_buf) )
> The new version is:
> #define ctime_r( _clock, _buf ) \
> ( strcpy( (_buf), ctime( (_tm) ) ), \
> (_buf) )
> It appears there was some sort of mixup with this function, because the
> macro is using an undefined variable _tm. Further, it is providing 3
> arguments to strcpy, which only wants 2.
> Am I going crazy here, or is this a bug?
> Ed Barker
> Signet Computers Inc.
> 1901 N Moore St. Suite 805
> Arlington, Va 22209
> 703-812-8585 (phone)