Re: [HACKERS] more dirmod CYGWIN

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 13:01:57
Message-ID: 4141A5C5.60700@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Reini Urban schrieb:
> [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.

parallel tests hang on cygwin. this is expected.

attached is the postmaster stackdump on the parallel test (if you care),
and the IPC's during the parallel test (not quite busy...):
$ ipcs
Message Queues:
T ID KEY MODE OWNER GROUP

Shared Memory:
T ID KEY MODE OWNER GROUP
m 1966080 65432001 --rw------- rurban root

Semaphores:
T ID KEY MODE OWNER GROUP
s 1966080 65432001 --rw------- rurban root
s 1966081 65432002 --rw------- rurban root
s 1966082 65432003 --rw------- rurban root
s 1966083 65432004 --rw------- rurban root
s 1966084 65432005 --rw------- rurban root
s 1966085 65432006 --rw------- rurban root
s 1966086 65432007 --rw------- rurban root

with the serial schedule all tests but the last pass.
test tablespace ... FAILED

This is the tail of the postmaster log for this failing test.

ERROR: cannot alter table "fullname" because column "people"."fn" uses
its rowtype
ERROR: could not create symbolic link
"/usr/src/postgresql/pgsql/src/test/regress/./tmp_check/data/pg_tblspc/155118":
No error
ERROR: tablespace "testspace" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: could not set permissions on directory "/no/such/location": No
such file or directory
ERROR: tablespace "nosuchspace" does not exist
ERROR: tablespace "testspace" does not exist
ERROR: schema "testschema" does not exist
ERROR: tablespace "testspace" does not exist
LOG: received smart shutdown request
LOG: shutting down
LOG: database system is shut down

attached is the regression.diffs,

and also the overall patch against current CVS HEAD I used for this run.
(the move-#undef patch is probably already applied regarding bruce)
this should be applied.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment Content-Type Size
regression.diffs text/plain 3.5 KB
cvs-20040910-cygwin.patch text/plain 825 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-09-10 13:08:17 Re: APR 1.0 released
Previous Message Reini Urban 2004-09-10 12:30:20 Re: APR 1.0 released

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Dave Page 2004-09-10 13:15:29 Re: VC++ psql build broken
Previous Message Harald Massa 2004-09-10 11:46:08 no connection to server

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2004-09-10 14:31:03 Re: contrib/dbmirror
Previous Message Gaetano Mendola 2004-09-10 10:42:12 Re: psql tab-completion improvements