Thread: Patches for IRIX 6.5.3 (current snapshot)

Patches for IRIX 6.5.3 (current snapshot)

From
jarausch@numa1.igpm.rwth-aachen.de (Helmut Jarausch)
Date:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        : Helmut Jarausch
Your email address    : jarausch@igpm.rwth-aachen.de


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : SGI PowerIndigo 2

  Operating System (example: Linux 2.0.26 ELF)     : IRIX 6.5.3

  PostgreSQL version (example: PostgreSQL-6.4)  : PostgreSQL-6.5.1 snapshot

  Compiler used (example:  gcc 2.8.0)        : egcs-1.1.2


Please enter a FULL description of your problem:
------------------------------------------------

See below



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------





If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

1st)
   remove the  .global directive  in src/backend/storage/buffer/s_lock.s
   after
   #if defined(__mips)

2nd) there is a conflicting _ALIGN macro in  <sys/socket.h> here
   so, rename the macro  _ALIGN in src/include/utils/memutils.h  e.g. to
   _PG_ALIGN
   giving

#define _PG_ALIGN(ALIGNVAL,LEN)    (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1))

#define SHORTALIGN(LEN)            _PG_ALIGN(ALIGNOF_SHORT, (LEN))
#define INTALIGN(LEN)            _PG_ALIGN(ALIGNOF_INT, (LEN))
#define LONGALIGN(LEN)            _PG_ALIGN(ALIGNOF_LONG, (LEN))
#define DOUBLEALIGN(LEN)        _PG_ALIGN(ALIGNOF_DOUBLE, (LEN))
#define MAXALIGN(LEN)            _PG_ALIGN(MAXIMUM_ALIGNOF, (LEN))


3rd)
(Quite) new Perl5 versions have a different name space. For the moment
  edit
  interfaces/perl5/Makefile.PL
  and add the line
  CCFLAGS      => '-DPERL_POLLUTE',
  in the %opts hash, i.e.


if (! $ENV{POSTGRES_HOME}) {

    # Check that we actually are inside the Postgres source tree
    if (! -d "../libpq") {
    die
"To install Pg separately from the Postgres distribution,
you must set environment variable POSTGRES_HOME to point to
where Postgres is installed (often /usr/local/pgsql).\n";
    }

    # Setup for build/test inside a Postgres source tree

    # Perl may complain if path to libpq isn't absolute
    my $cwd = `pwd`;
    chop $cwd;

    %opts = (
        NAME         => 'Pg',
        VERSION_FROM => 'Pg.pm',
        INC          => "-I../libpq -I../../include",
        OBJECT       => "Pg\$(OBJ_EXT)",
        LIBS         => ["-L$cwd/../libpq -lpq"],
         CCFLAGS      => '-DPERL_POLLUTE',
   );

} else {

    # Setup for final install of Pg using an already-installed libpq,
    # or for standalone installation when Postgres already is installed.

    %opts = (
        NAME         => 'Pg',
        VERSION_FROM => 'Pg.pm',
        INC          => "-I$ENV{POSTGRES_HOME}/include",
        OBJECT       => "Pg\$(OBJ_EXT)",
        LIBS         => ["-L$ENV{POSTGRES_HOME}/lib -lpq"],
        CCFLAGS      => '-DPERL_POLLUTE',
    );
}