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

Postgres on Alpha+DigitalUnix with ODBC

From: Stephane Bortzmeyer <bortzmeyer(at)pasteur(dot)fr>
To: pgsql-ports(at)postgresql(dot)org
Cc: bortzmeyer(at)pasteur(dot)fr
Subject: Postgres on Alpha+DigitalUnix with ODBC
Date: 1999-03-19 15:52:20
Message-ID: 199903191552.QAA03300@ezili.sis.pasteur.fr (view raw or flat)
Thread:
Lists: pgsql-ports
				
Hello, 

I just compiled the last version of Postgres (details, version numbers, etc, 
at the end) on an Alpha with Digital Unix, with the egcs compiler. I had two 
problems:

1) src/backend/storage/buffer/buf_init.c does not compile. The code intended 
for gcc on the ALpha is really broken (it mixes an int with a struct of two 
ints, declared in Digital Unix headers). Using the code intended for other 
compilers work fine. (Or seems to: regression tests, both yours and mine, 
work, but may be I have no spin locks at all.)

2) ODBC does not compile:

gcc -I../../include -I../../backend   -DNOFIXADE  -Wall -Wmissing-prototypes 
-I. -DHAVE_CONFIG_H   -c misc.c -o misc.o
misc.c:61: warning: no previous prototype for `mylog'
misc.c: In function `mylog':
misc.c:69: incompatible types in assignment
misc.c:70: request for member `__offset' in something not a structure or union
misc.c:70: request for member `__base' in something not a structure or union
misc.c:70: request for member `__offset' in something not a structure or union
misc.c:70: request for member `__offset' in something not a structure or union
misc.c:70: warning: left-hand operand of comma expression has no effect
misc.c:80: incompatible type for argument 3 of `vfprintf'
misc.c: At top level:
misc.c:91: warning: no previous prototype for `qlog'
misc.c: In function `qlog':
misc.c:99: incompatible types in assignment
misc.c:100: request for member `__offset' in something not a structure or union
misc.c:100: request for member `__base' in something not a structure or union
misc.c:100: request for member `__offset' in something not a structure or union
misc.c:100: request for member `__offset' in something not a structure or union
misc.c:100: warning: left-hand operand of comma expression has no effect
misc.c:111: incompatible type for argument 3 of `vfprintf'
make: *** [misc.o] Error 1

It is a bug in the use of va*. Here is a patch which seems to work (not tested the ODBC driver yet):

*** postgresql-6.4.2/src/interfaces/odbc/misc.c Wed Oct 28 18:09:21 1998
--- /local/packages/postgresql-6.4.2/src/interfaces/odbc/misc.c Fri Mar 19 13:36:05 1999
***************
*** 61,67 ****
  va_dcl
  {
  char *fmt;
! char *args;
  char filebuf[80];
        FILE* LOGFP = globals.mylogFP;
  
--- 61,67 ----
  va_dcl
  {
  char *fmt;
! va_list args; 
  char filebuf[80];
        FILE* LOGFP = globals.mylogFP;
  
***************
*** 91,97 ****
  va_dcl
  {
  char *fmt;
! char *args;
  char filebuf[80];
  FILE* LOGFP = globals.qlogFP;
  
--- 91,97 ----
  va_dcl
  {
  char *fmt;
! va_list args;
  char filebuf[80];
  FILE* LOGFP = globals.qlogFP;
  

A suggestion: change the name of the template from "alpha" to "alphadu" (Digital Unix) because Alpha/Linux has different problems. Do not mix hardware with operating system.

-----

Postgres : 6.4.2
egcs : 2.91.60 (release 1.1.1)
Digital Unix : V4.0B  (Rev. 564)






pgsql-ports by date

Next:From: Dan LauterbachDate: 1999-03-19 18:26:08
Subject: Regression test compilation fails on HP-UX 10.20
Previous:From: Unprivileged userDate: 1999-03-19 04:29:18
Subject: Port Bug Report: psql create/drop table bug

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