Re: [tcpdump-workers] Use of critical section on Win32

2013-05-14 Thread Guy Harris
On May 14, 2013, at 8:21 AM, Gisle Vanem wrote: > I really don't understand the motivation behind the Win32-code > for pcap_compile(). I assume the motivation is that pcap_compile() is not thread-safe. It's no more thread-safe on UN*X, so if the goal is to allow programs to use it without hav

[tcpdump-workers] Use of critical section on Win32

2013-05-14 Thread Gisle Vanem
I really don't understand the motivation behind the Win32-code for pcap_compile(). In gencode.c: int pcap_compile(pcap_t *p, struct bpf_program *program, const char *buf, int optimize, bpf_u_int32 mask) { int result; EnterCriticalSection(&g_PcapCompileCriticalSection); result = pcap_compil