This is the mail archive of the
mailing list for the pthreas-win32 project.
problems with ctime_r
- To: pthreads-win32 at sourceware dot cygnus dot com
- Subject: problems with ctime_r
- From: Ed Barker <barkeref at sigcomp dot com>
- Date: Thu, 21 Dec 2000 14:27:50 -0500
I just downloaded the latest version of pthreads-win32, and I am now
Most of the errors were due to redefinitions of symbols defined in winsock.
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 of
The old version was:
#define ctime_r( _clock, _buf, _len ) \
( strncpy( (_buf), ctime( (_clock) ), (_len) ), \
The new version is:
#define ctime_r( _clock, _buf ) \
( strcpy( (_buf), ctime( (_tm) ) ), \
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?
Signet Computers Inc.
1901 N Moore St. Suite 805
Arlington, Va 22209