Ignore:
Timestamp:
Sep 21, 2008, 9:55:08 PM (17 years ago)
Author:
bird
Message:

incdep: windows build fixes and some adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/incdep.c

    r1803 r1804  
    3030*   Header Files                                                               *
    3131*******************************************************************************/
    32 /*#define PARSE_IN_WORKER*/
    33 
    3432#ifdef __OS2__
    3533# define INCL_BASE
     
    6462#ifdef WINDOWS32
    6563# include <io.h>
     64# include <process.h>
    6665# include <Windows.h>
     66# define PARSE_IN_WORKER
    6767#endif
    6868
     
    194194/* The handles to the worker threads. */
    195195#ifdef HAVE_PTHREAD
    196 static pthread_t incdep_threads[4];
     196static pthread_t incdep_threads[2];
    197197#elif defined (WINDOWS32)
    198 static HANDLE incdep_threads[4];
     198static HANDLE incdep_threads[2];
    199199#elif defined (__OS2__)
    200 static TID incdep_threads[4];
    201 #endif
    202 static unsigned incdep_num_threads = 1;
     200static TID incdep_threads[2];
     201#endif
     202static unsigned incdep_num_threads;
    203203
    204204/* flag indicating whether the worker threads should terminate or not. */
     
    537537      hThread = _beginthreadex (NULL, 128*1024, incdep_worker_windows,
    538538                                NULL, 0, &tid);
    539       if (hThread != 0 && hThread != ~(uintptr_t)0)
     539      if (hThread == 0 || hThread == ~(uintptr_t)0)
    540540        fatal (f, _("_beginthreadex failed: err=%d"), errno);
    541541      incdep_threads[i] = (HANDLE)hThread;
Note: See TracChangeset for help on using the changeset viewer.