Port Bug Report: DEC OSF compile fails in buf_init.c - Mailing list pgsql-ports

From Unprivileged user
Subject Port Bug Report: DEC OSF compile fails in buf_init.c
Date
Msg-id 199902151603.LAA24594@hub.org
Whole thread Raw
List pgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        : Robert Moniot
Your email address    : moniot@fordham.edu

Category        : install: compile
Severity        : serious

Summary: DEC OSF compile fails in buf_init.c

System Configuration
--------------------
  Operating System   : Digital Unix 4.0D

  PostgreSQL version : 6.4.2

  Compiler used      : gcc 2.8.0

Hardware:
---------
OSF1 erdos V4.0 878 alpha.  AlphaStation 1000

Versions of other tools:
------------------------
gmake 3.76.1
flex 2.5.4

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

Problem Description:
--------------------
Compilation fails at line 234 of src/backend/storage/buffer/buf_init.c.
Error message: storage/s_lock.h:102: aggregate value used where an integer was expected

The problem is apparently the assignment implied by  return (int) _res;
at the end of the alpha assembly code for tas() at line 102 in s_lock.h.

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

Test Case:
----------
This is platform specific.  I don't know which versions of DEC UNIX
would be affected, but probably at least all since 4.0.


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

Solution:
---------
My fix involved simply copying the definitions of TAS, S_UNLOCK,
et al. from the non-gcc section of s_lock.h into the gcc section,
and commenting out the assembly-language definitions.

I do not include a patch, since this is probably not the best way
to fix the problem.  The best way would be to correct the assembly
language version of tas(), but this is beyond my expertise.


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


pgsql-ports by date:

Previous
From: "Stan Brown"
Date:
Subject: Building Postgres on FreeBSD with tcl support
Next
From: Unprivileged user
Date:
Subject: Port Bug Report: