This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems with ctime_r


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" <barkeref@sigcomp.com>
To: <pthreads-win32@sourceware.cygnus.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
winsock.
>  I was able to work around this by making sure I included winsock before
> pthread.h.
>
> 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
> pthread.h
>
> 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
>
>
> Ed Barker
> Signet Computers Inc.
> 1901 N Moore St.  Suite 805
> Arlington, Va 22209
> 703-812-8585 (phone)
> www.sigcomp.com
> barkeref@sigcomp.com
>
>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]