From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5161 invoked by alias); 20 Jun 2005 08:16:04 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 5134 invoked by uid 22791); 20 Jun 2005 08:15:55 -0000 Received: from mail2.ncc.eurodata.de (HELO mail2.ncc.eurodata.de) (212.89.134.26) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 20 Jun 2005 08:15:55 +0000 Received: from vscan2.ncc.eurodata.de (vscan2.ncc.eurodata.de [212.89.134.22]) by mail2.ncc.eurodata.de (Postfix) with ESMTP id 1CAC05583D3 for ; Mon, 20 Jun 2005 10:15:53 +0200 (CEST) Received: by vscan2.ncc.eurodata.de (Postfix, from userid 8) id 1F9219DDA0; Mon, 20 Jun 2005 10:15:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by vscan2.ncc.eurodata.de (Postfix) with ESMTP id 995B69DD56 for ; Mon, 20 Jun 2005 10:15:51 +0200 (CEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by mail2.ncc.eurodata.de (Postfix) with ESMTP id 8096B5583E6 for ; Mon, 20 Jun 2005 10:15:51 +0200 (CEST) Received: from [10.1.1.8] (mail-redir.eurodata.de [10.2.2.50]) by mail2.ncc.eurodata.de (Postfix) with ESMTP id 51E355583D3 for ; Mon, 20 Jun 2005 10:15:51 +0200 (CEST) Message-ID: <42B67B37.7090206@cpan.org> Date: Mon, 20 Jun 2005 08:16:00 -0000 From: Steffen Goeldner User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: #define WIN32_LEAN_AND_MEAN Content-Type: multipart/mixed; boundary="------------000101090308060309000003" X-SW-Source: 2005/txt/msg00112.txt.bz2 This is a multi-part message in MIME format. --------------000101090308060309000003 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 541 To speed the build process, avoid possible name clashes etc., one #includes only necessary header files. However, once you need , it opens the floodgates. To exclude rarely-used Windows header files, I added #define WIN32_LEAN_AND_MEAN 1 to implement.h, pthread.h and various test files - see for details. Now, we have to be explicit if we need additional Windows header files, e.g. in cancel9.c. Similar for . Steffen Goeldner --------------000101090308060309000003 Content-Type: text/plain; name="pthreads-w32-2-7-0-release.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pthreads-w32-2-7-0-release.diff" Content-length: 2827 diff -ubr pthreads-w32-2-7-0-release-orig/implement.h pthreads-w32-2-7-0-release/implement.h --- pthreads-w32-2-7-0-release-orig/implement.h Fri Jun 03 10:36:27 2005 +++ pthreads-w32-2-7-0-release/implement.h Fri Jun 17 15:02:14 2005 @@ -43,6 +43,7 @@ #endif #define _WIN32_WINNT 0x400 +#define WIN32_LEAN_AND_MEAN 1 #include /* diff -ubr pthreads-w32-2-7-0-release-orig/pthread.h pthreads-w32-2-7-0-release/pthread.h --- pthreads-w32-2-7-0-release-orig/pthread.h Fri Jun 03 10:36:28 2005 +++ pthreads-w32-2-7-0-release/pthread.h Fri Jun 17 15:02:50 2005 @@ -195,6 +195,7 @@ #endif #ifdef PTW32_INCLUDE_WINDOWS_H +#define WIN32_LEAN_AND_MEAN 1 #include #endif diff -ubr pthreads-w32-2-7-0-release-orig/tests/benchlib.c pthreads-w32-2-7-0-release/tests/benchlib.c --- pthreads-w32-2-7-0-release-orig/tests/benchlib.c Sat Jan 01 15:36:18 2005 +++ pthreads-w32-2-7-0-release/tests/benchlib.c Fri Jun 17 15:39:36 2005 @@ -37,8 +37,10 @@ #include "pthread.h" #include "sched.h" #include "semaphore.h" +#define WIN32_LEAN_AND_MEAN 1 #include #include +#include #ifdef __GNUC__ #include diff -ubr pthreads-w32-2-7-0-release-orig/tests/cancel9.c pthreads-w32-2-7-0-release/tests/cancel9.c --- pthreads-w32-2-7-0-release-orig/tests/cancel9.c Wed May 18 16:34:19 2005 +++ pthreads-w32-2-7-0-release/tests/cancel9.c Fri Jun 17 15:33:07 2005 @@ -73,7 +73,9 @@ */ #include "test.h" +#define WIN32_LEAN_AND_MEAN 1 #include +#include void * diff -ubr pthreads-w32-2-7-0-release-orig/tests/test.h pthreads-w32-2-7-0-release/tests/test.h --- pthreads-w32-2-7-0-release-orig/tests/test.h Thu Apr 28 06:41:29 2005 +++ pthreads-w32-2-7-0-release/tests/test.h Fri Jun 17 15:27:55 2005 @@ -42,8 +42,10 @@ #include "sched.h" #include "semaphore.h" +#define WIN32_LEAN_AND_MEAN 1 #include #include +#include #define PTW32_THREAD_NULL_ID {NULL,0} diff -ubr pthreads-w32-2-7-0-release-orig/tests/tryentercs.c pthreads-w32-2-7-0-release/tests/tryentercs.c --- pthreads-w32-2-7-0-release-orig/tests/tryentercs.c Sat Jan 01 15:36:19 2005 +++ pthreads-w32-2-7-0-release/tests/tryentercs.c Fri Jun 17 15:13:15 2005 @@ -37,6 +37,7 @@ * Does not use any part of pthreads. */ +#define WIN32_LEAN_AND_MEAN 1 #include #include #include diff -ubr pthreads-w32-2-7-0-release-orig/tests/tryentercs2.c pthreads-w32-2-7-0-release/tests/tryentercs2.c --- pthreads-w32-2-7-0-release-orig/tests/tryentercs2.c Sat Jan 01 15:36:19 2005 +++ pthreads-w32-2-7-0-release/tests/tryentercs2.c Fri Jun 17 15:13:23 2005 @@ -37,6 +37,7 @@ * Does not use any part of pthreads. */ +#define WIN32_LEAN_AND_MEAN 1 #include #include #include --------------000101090308060309000003--