From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49094 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUJit-0004HK-OT for qemu-devel@nongnu.org; Thu, 01 Jul 2010 09:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUJir-00063h-Rf for qemu-devel@nongnu.org; Thu, 01 Jul 2010 09:22:35 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:58324) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUJir-00063V-E6 for qemu-devel@nongnu.org; Thu, 01 Jul 2010 09:22:33 -0400 Message-ID: <4C2C968B.40007@mail.berlios.de> Date: Thu, 01 Jul 2010 15:22:19 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] win32: Add missing function setenv References: <1277981269-751-1-git-send-email-weil@mail.berlios.de> <4C2C8110.2090200@redhat.com> In-Reply-To: <4C2C8110.2090200@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: QEMU Developers Am 01.07.2010 13:50, schrieb Jes Sorensen: > On 07/01/10 12:47, Stefan Weil wrote: > >> Mingw32 does not provide a declaration and implementation of function >> setenv (which is used in sdl.c), so this patch adds both. >> >> Signed-off-by: Stefan Weil >> > [snip] > >> diff --git a/osdep.h b/osdep.h >> index 75b5816..1cdc7e2 100644 >> --- a/osdep.h >> +++ b/osdep.h >> @@ -95,6 +95,8 @@ int qemu_create_pidfile(const char *filename); >> #ifdef _WIN32 >> int ffs(int i); >> >> +int setenv(const char *name, const char *value, int overwrite); >> + >> typedef struct { >> long tv_sec; >> long tv_usec; >> > Please move this to qemu-os-win32.h instead, otherwise the build will > fail on POSIX systems due to setenv being redefined. > > Thanks, > Jes > It won't fail for two reasons: * It is not redefined (at least for linux systems) because I used the POSIX declaration. * It is compiled only for _WIN32 (see line 95). Regards Stefan