Skip site navigation (1) Skip section navigation (2)

Re: Suppress warnings on mingw

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Suppress warnings on mingw
Date: 2007-04-18 08:32:51
Message-ID: 20070418083251.GD20431@svr2.hagander.net (view raw or flat)
Thread:
Lists: pgsql-patches
On Mon, Apr 16, 2007 at 12:32:56PM +0900, ITAGAKI Takahiro wrote:
> This trivial patch fixes the following warnings on mingw.
> 
> ----
> pthread-win32.c:20: warning: no previous prototype for 'pthread_self'

> Index: src/bin/pgevent/pgevent.def
> ===================================================================
> --- src/bin/pgevent/pgevent.def	(HEAD)
> +++ src/bin/pgevent/pgevent.def	(working copy)
> @@ -1,4 +1,4 @@
>  ; dlltool --output-def pgevent.def pgevent.o pgmsgevent.o
>  EXPORTS
> -	DllUnregisterServer ;
> -	DllRegisterServer ;
> +	DllUnregisterServer = DllUnregisterServer(at)0 ;
> +	DllRegisterServer = DllRegisterServer(at)0 ;

This breaks the MSVC build, so not applied. Are you sure we should not just
follow the instructions given in the error msg?

pgevent.exp : error LNK2001: unresolved external symbol DllRegisterServer(at)0
.\Debug\pgevent\pgevent.dll : fatal error LNK1120: 1 unresolved externals


> Index: src/port/pthread-win32.h
> ===================================================================
> --- src/port/pthread-win32.h	(HEAD)
> +++ src/port/pthread-win32.h	(working copy)
> @@ -5,7 +5,7 @@
>  typedef HANDLE pthread_mutex_t;
>  typedef int pthread_once_t;
>  
> -DWORD		pthread_self();
> +DWORD		pthread_self(void);
>  
>  void		pthread_setspecific(pthread_key_t, void *);
>  void	   *pthread_getspecific(pthread_key_t);
> 
I've applied the fix for this. I also updated the C file, since with your
patch the C and the H file had different things. If there was a reason you
didn't update the C file, let me know and I'll revert that part.


//Magnus

In response to

Responses

pgsql-patches by date

Next:From: ITAGAKI TakahiroDate: 2007-04-18 08:46:00
Subject: Re: Suppress warnings on mingw
Previous:From: Simon RiggsDate: 2007-04-18 07:14:42
Subject: Re: log_autovacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group