Re: more dirmod CYGWIN (was: APR 1.0 released)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: more dirmod CYGWIN (was: APR 1.0 released)
Дата
Msg-id 200410080027.i980RLl02565@candle.pha.pa.us
обсуждение исходный текст
Ответ на more dirmod CYGWIN (was: APR 1.0 released)  (Reini Urban <rurban@x-ray.at>)
Ответы Re: more dirmod CYGWIN (was: APR 1.0 released)  (Gaetano Mendola <mendola@bigfoot.com>)
Список pgsql-hackers
I just made some major Win32 modifications in the past few days.  Would
you try Cygwin compile and see if the following warnings are removed and
the rest of the system builds OK?

---------------------------------------------------------------------------

Reini Urban wrote:
> [BTW: there's no need to cc all, I'm subscribed to most lists]
> 
> Reini Urban schrieb:
> > Bruce Momjian schrieb:
> >> Andrew Dunstan wrote:
> >>> Reini Urban wrote:
> >>>
> >>>> FYI: WIN32 is also defined because <windows.h> is included. 
> >>>> (/usr/incluse/w32api/windef.h)
> >>>> If you want this or that, do proper nesting, and use #else.
> >>>
> >>> Ugh, yes. A little experimentation shows that __WIN32__ is defined 
> >>> for MinGW only, but WIN32 is for both. I wonder how we missed that in 
> >>> various places. Maybe we need a little audit of the use of WIN32.
> >>
> >>
> >> OK, fixed.  We should not be using __WIN32__, just Win32.  The proper
> >> test is #ifndef __CYGWIN__.
> > 
> > 
> > very good. just think of future MSVC versions.
> > 
> > Just one more glitch:
> > 
> > #undef rename
> > #undef unlink
> > 
> > has to be defined before #include <unistd.h> on CYGWIN, because
> > unistd.h has the declarations for rename and unlink, which are required 
> > inside the pg versions.
> > without the #undef, the macros which rename rename to pgrename, ... are 
> > still effective, which will lead to undeclared/falsely autodeclared 
> > rename/unlink parts.
> > 
> > I don't know for mingw, if they need the pgrename/pgunlink declaration.
> > For my CYGWIN patch I moved those two lines before #include <unistd.h>.
> 
> FYI: latest cvs HEAD, without any patches.
> 
> make runs now through with the expected implicit declaration warnings, 
> but without any errors. Esp. the CYGWIN-specific SHMLIB linking errors 
> are now gone. good!
> 
> make[2]: Entering directory `/usr/src/postgresql/pgsql/src/port'
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes 
> -Wmissing-declarations -I../../src/port -I../../src/include   -c -o 
> dirmod.o dirmod.c
> dirmod.c: In Funktion >>pgunlink<<:
> dirmod.c:113: Warnung: implicit declaration of function `unlink'
> dirmod.c: In Funktion >>rmt_cleanup<<:
> dirmod.c:267: Warnung: implicit declaration of function `pgport_pfree'
> dirmod.c: In Funktion >>rmtree<<:
> dirmod.c:318: Warnung: implicit declaration of function `pgport_palloc'
> dirmod.c:318: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne 
> Typkonvertierung
> dirmod.c:333: Warnung: implicit declaration of function `pgport_pstrdup'
> dirmod.c:333: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne 
> Typkonvertierung
> 
> make check hangs at:
> "running on port 65432 with pid 2304
> ============== creating database "regression"         ==============
> CREATE DATABASE
> ALTER DATABASE
> ============== dropping regression test user accounts ==============
> ============== installing PL/pgSQL                    ==============
> ============== running regression test queries        ==============
> parallel group (13 tests):  int2 int4 int8 float4 name varchar numeric"
> 
> which means rename works ok. probably the false implicit declarations in 
> the memory code break it.
> 
> I'll come with another patch later.
> -- 
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faqs/FAQ.html
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: APR 1.0 released
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: more dirmod CYGWIN