larryi      02/05/02 22:39:58

  Modified:    jk/native/common jk_global.h
  Log:
  Add a macro for WIN32 to emulate the gettimeofday() function using the
  WIN32 _ftime() function.
  
  Revision  Changes    Path
  1.17      +7 -1      jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_global.h       4 Dec 2001 19:44:23 -0000       1.16
  +++ jk_global.h       3 May 2002 05:39:58 -0000       1.17
  @@ -59,7 +59,7 @@
    * Description: Global definitions and include files that should exist     *
    *              anywhere                                                   *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.16 $                                               *
  + * Version:     $Revision: 1.17 $                                               *
    ***************************************************************************/
   
   #ifndef JK_GLOBAL_H
  @@ -81,6 +81,7 @@
   #ifdef WIN32
       #include <windows.h>
       #include <winsock.h>
  +    #include <sys/timeb.h>
   #else
       #include <unistd.h>
       #include <netdb.h>
  @@ -192,6 +193,11 @@
   #endif /* CHARSET_EBCDIC */
   
   #endif /* APR_CHARSET_EBCDIC */
  +
  +#ifdef WIN32
  +/* For WIN32, emulate gettimeofday() using _ftime() */
  +#define gettimeofday(tv,tz) { struct _timeb tb; _ftime(&tb); (tv)->tv_sec = 
tb.time; (tv)->tv_usec = tb.millitm * 1000; }
  +#endif
   
   #ifdef __cplusplus
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to