cvsuser     04/02/09 02:47:47

  Modified:    src      events.c
  Log:
  event-handling-26
  * turn off some stuff for WIN32
  
  Revision  Changes    Path
  1.33      +19 -2     parrot/src/events.c
  
  Index: events.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/events.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -w -r1.32 -r1.33
  --- events.c  9 Feb 2004 10:12:56 -0000       1.32
  +++ events.c  9 Feb 2004 10:47:46 -0000       1.33
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: events.c,v 1.32 2004/02/09 10:12:56 leo Exp $
  +$Id: events.c,v 1.33 2004/02/09 10:47:46 leo Exp $
   
   =head1 NAME
   
  @@ -84,7 +84,12 @@
   #ifndef SIGINT
   #  define SIGINT -4711
   #endif
  -static sig_atomic_t sig_int;
  +
  +/*
  + * XXX need a configure test
  + * should be sig_atomic_t
  + */
  +static int sig_int;
   
   /*
    * a pipe is used to send messages to the IO thread
  @@ -233,8 +238,14 @@
        * we use a message pipe to send IO related stuff to the
        * IO thread
        */
  +#ifndef WIN32
  +    /*
  +     * pipes on WIN32 don't support select
  +     * s. p6i: "event.c - of signals and pipes"
  +     */
       if (pipe(pipe_fds))
           internal_exception(1, "Couldn't create message pipe");
  +#endif
       /*
        * now set some sig handlers before any thread is started, so
        * that all threads inherit the signal block mask
  @@ -249,7 +260,9 @@
       /*
        * and a signal and IO handler thread
        */
  +#ifndef WIN32
       THREAD_CREATE_DETACHED(io_handle, io_thread, event_queue);
  +#endif
   }
   
   /*
  @@ -602,6 +615,7 @@
   
   */
   
  +#ifndef WIN32
   static void*
   io_thread(void *data)
   {
  @@ -682,6 +696,7 @@
       close(PIPE_WRITE_FD);
       return NULL;
   }
  +#endif
   
   /*
   
  @@ -704,8 +719,10 @@
       buf[0] = 'e';
       buf[1] = -1;
       buf[2] = '\n';
  +#ifndef WIN32
       if (write(PIPE_WRITE_FD, buf, MSG_SIZE) != MSG_SIZE)
           internal_exception(1, "msg pipe write failed");
  +#endif
   }
   
   /*
  
  
  

Reply via email to