You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2005/03/22 09:06:43 UTC

cvs commit: embperl Changes.pod eputil.c

richter     2005/03/22 00:06:42

  Modified:    .        Changes.pod eputil.c
  Log:
  gmtime ersetzt
  
  Revision  Changes    Path
  1.271     +5 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.270
  retrieving revision 1.271
  diff -u -r1.270 -r1.271
  --- Changes.pod	14 Mar 2005 18:32:48 -0000	1.270
  +++ Changes.pod	22 Mar 2005 08:06:38 -0000	1.271
  @@ -1,5 +1,10 @@
   =pod
   
  +=head2 2.0rc4
  +
  +   - use gmtime_r instead of gmtime for time calculation to be thread safe
  +
  +
   =head1 2.0rc3 14. March 2005
   
      - Handle warnings the same way under Embperl and Embperl::Object, so they
  
  
  
  1.45      +7 -7      embperl/eputil.c
  
  Index: eputil.c
  ===================================================================
  RCS file: /home/cvs/embperl/eputil.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- eputil.c	22 Feb 2005 16:34:29 -0000	1.44
  +++ eputil.c	22 Mar 2005 08:06:39 -0000	1.45
  @@ -2011,7 +2011,7 @@
   const char * embperl_CalcExpires(const char *sTime, char * sResult, int bHTTP)
   {
       time_t when;
  -    struct tm *tms;
  +    struct tm tms;
       int sep = bHTTP ? ' ' : '-';
       dTHX ;
   
  @@ -2026,13 +2026,13 @@
   	return sResult ;
       }
   
  -    tms = gmtime(&when);
  +    gmtime_r(&when, &tms);
       sprintf(sResult,
   		       "%s, %.2d%c%s%c%.2d %.2d:%.2d:%.2d GMT",
  -		       ep_day_snames[tms->tm_wday],
  -		       tms->tm_mday, sep, ep_month_snames[tms->tm_mon], sep,
  -		       tms->tm_year + 1900,
  -		       tms->tm_hour, tms->tm_min, tms->tm_sec);
  +		       ep_day_snames[tms.tm_wday],
  +		       tms.tm_mday, sep, ep_month_snames[tms.tm_mon], sep,
  +		       tms.tm_year + 1900,
  +		       tms.tm_hour, tms.tm_min, tms.tm_sec);
       return sResult ;
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org